From 9b3eb6d00077319a8da82d65c77dd501e21f52d5 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 15 Oct 2024 16:33:47 +0200 Subject: allow setting license stuff from global variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- src/main.zig | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index b5a6967..6cf86a5 100644 --- a/src/main.zig +++ b/src/main.zig @@ -10,10 +10,12 @@ const PAGE_PATH = "src/inc"; const SITE_ROOT = "."; const SITE_PATH = "site"; -const DOMAIN_URL = "https://example.com"; -const SITE_NAME = "example"; -const LICENSE_URL = "https://example.com/license"; -const SOURCE_URL = "https://example.com/source"; +const DOMAIN_URL = "https://gzr.im"; +const SITE_NAME = "gzr.im"; +const LICENSE_HOLDER = "robertgzr"; +const LICENSE_NAME = "BY-NC-SA 4.0"; +const LICENSE_URL = "https://git.sr.ht/~robertgzr/site/blob/rabbits/LICENSE.content"; +const SOURCE_URL = "https://git.sr.ht/~robertgzr/site/tree/rabbits"; const BuildErrors = (std.fs.File.OpenError || std.fs.File.WriteError || std.mem.Allocator.Error); @@ -210,17 +212,19 @@ fn build(allocator: std.mem.Allocator, f: std.fs.File, page_name: []const u8, sr try f.writer().print( \\ \\ , .{ .MTIME = mtime, .PATH = srcpath, - .LICENSE = LICENSE_URL, - .SOURCE = SOURCE_URL, + .LICENSE_HOLDER = LICENSE_HOLDER, + .LICENSE_NAME = LICENSE_NAME, + .LICENSE_URL = LICENSE_URL, + .SOURCE_URL = SOURCE_URL, }); } -- cgit 1.4.1