From c00db66740a9b310e02a41480aabb8f91f867bde Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 7 Jan 2025 11:34:36 +0100 Subject: render tildes into links/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add symlink for ~thesis for backwards compatability with old site Signed-off-by: Robert Günzler --- src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.zig b/src/main.zig index 10eead9..3e2fa7e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -7,8 +7,8 @@ const c = @cImport({ }); const PAGE_PATH = "src/inc"; -const SITE_ROOT = "."; const SITE_PATH = "site"; +const LINK_PATH = "links"; const SITE_NAME = "gzr.im"; const LICENSE_HOLDER = "robertgzr"; @@ -259,7 +259,7 @@ fn meta(ctx: *Context, p: []const u8) !void { const dstname = p[11..dot.?]; const srcpath = try joinIn(ctx.allocator, &.{PAGE_PATH}, &.{p}); defer ctx.allocator.free(srcpath); - const dstpath = try joinIn(ctx.allocator, &.{SITE_ROOT}, &.{ "~", dstname }); + const dstpath = try joinIn(ctx.allocator, &.{LINK_PATH}, &.{ "~", dstname }); defer ctx.allocator.free(dstpath); const link = blk: { -- cgit 1.4.1