migrate to standalone zine

This commit is contained in:
CJ van den Berg 2025-04-09 17:12:02 +02:00
parent a89d3a5461
commit 9cf52dd60d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
8 changed files with 18 additions and 41 deletions

3
.gitignore vendored
View file

@ -1,2 +1 @@
.zig-cache /public/
zig-out

View file

@ -1,6 +1,6 @@
# Building # Building
To build this site, you need zig To build this site, you need zine
Just clone the repository Just clone the repository
``` ```
@ -10,7 +10,7 @@ cd flow-control.dev
and issue and issue
``` ```
zig build serve zine
``` ```
Then visit with your browser the site pointed by the previous command Then visit with your browser the site pointed by the previous command

View file

@ -1,24 +0,0 @@
const std = @import("std");
const zine = @import("zine");
pub fn build(b: *std.Build) !void {
_ = zine.website(b, .{
.title = "Flow Control: a progammer's text editor",
.host_url = "https://flow-control.dev",
.content_dir_path = "content",
.layouts_dir_path = "layouts",
.assets_dir_path = "assets",
});
const install_step = b.addInstallFile(b.path("install"), "install");
b.getInstallStep().dependOn(&install_step.step);
const install_key = b.addInstallFile(b.path("public.gpg"), "public.gpg");
b.getInstallStep().dependOn(&install_key.step);
const install_font = b.addInstallFile(b.path("assets/fonts/AcPlus_IBM_VGA_9x16.ttf"), "fonts/AcPlus_IBM_VGA_9x16.ttf");
b.getInstallStep().dependOn(&install_font.step);
const install_font2 = b.addInstallFile(b.path("assets/fonts/Iosevka-Regular.woff2"), "fonts/Iosevka-Regular.woff2");
b.getInstallStep().dependOn(&install_font2.step);
}

View file

@ -1,11 +0,0 @@
.{
.name = "Zine Website",
.version = "0.0.0",
.dependencies = .{
.zine = .{
.url = "git+https://github.com/kristoff-it/zine?ref=v0.8.0#ec0f549654a4f7183d4520227b6748bba7ade98e",
.hash = "122049c99f3faaaff159cdccb3792d1518b10534e8225e26e5b24a369d325b0ebdc5",
},
},
.paths = .{"."},
}

View file

@ -12,7 +12,7 @@
</head> </head>
<body> <body>
<nav id="menu" class="centered"> <nav id="menu" class="centered">
<ctx about="$site.page('index')"> <ctx about="$site.page('')">
<a href="$ctx.about.link()" text="$ctx.about.title">Home</a> <a href="$ctx.about.link()" text="$ctx.about.title">Home</a>
</ctx> </ctx>

13
zine.ziggy Normal file
View file

@ -0,0 +1,13 @@
Site {
.title = "Flow Control: a progammer's text editor",
.host_url = "https://flow-control.dev",
.content_dir_path = "content",
.layouts_dir_path = "layouts",
.assets_dir_path = "assets",
.static_assets = [
"install",
"public.gpg",
"fonts/AcPlus_IBM_VGA_9x16.ttf",
"fonts/Iosevka-Regular.woff2",
],
}