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 --- index.html | 6 +++--- links/~ba | 16 ++++++++++++++++ links/~cv | 16 ++++++++++++++++ links/~pgp | 16 ++++++++++++++++ links/~ssh | 16 ++++++++++++++++ links/~thesis | 16 ++++++++++++++++ src/main.zig | 4 ++-- ~thesis | 1 + 8 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 links/~ba create mode 100644 links/~cv create mode 100644 links/~pgp create mode 100644 links/~ssh create mode 100644 links/~thesis create mode 120000 ~thesis diff --git a/index.html b/index.html index 5cbbad9..66f8ff7 100644 --- a/index.html +++ b/index.html @@ -35,9 +35,9 @@
diff --git a/links/~ba b/links/~ba new file mode 100644 index 0000000..9040c72 --- /dev/null +++ b/links/~ba @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/links/~cv b/links/~cv new file mode 100644 index 0000000..404ddca --- /dev/null +++ b/links/~cv @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/links/~pgp b/links/~pgp new file mode 100644 index 0000000..3b664e5 --- /dev/null +++ b/links/~pgp @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/links/~ssh b/links/~ssh new file mode 100644 index 0000000..9619d1e --- /dev/null +++ b/links/~ssh @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/links/~thesis b/links/~thesis new file mode 100644 index 0000000..5e2db66 --- /dev/null +++ b/links/~thesis @@ -0,0 +1,16 @@ + + + + + + + + + + + + + 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: { diff --git a/~thesis b/~thesis new file mode 120000 index 0000000..31fb002 --- /dev/null +++ b/~thesis @@ -0,0 +1 @@ +links/~thesis \ No newline at end of file -- cgit 1.4.1