aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-05-27 02:56:07 -0400
committerRosa <rosaontheweb@proton.me>2026-05-27 02:56:07 -0400
commitf175552dcd86cda7a7fcafc1db211084fabd65a0 (patch)
tree48139b2e960f05517d9e175f463a38ab95cd57f1 /build.zig
parent7f58741cfea43780fcd8702afffeaea6cd322029 (diff)
actually did a bit of writing
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig16
1 files changed, 3 insertions, 13 deletions
diff --git a/build.zig b/build.zig
index 5db4634..efbfafd 100644
--- a/build.zig
+++ b/build.zig
@@ -2,18 +2,10 @@ const std = @import("std");
const webgen = @import("webgen");
pub fn build(b: *std.Build) void {
- const generate_html = b.addExecutable(.{
- .name = "generate_html",
- .root_module = b.createModule(.{
- .root_source_file = b.path("util/generate_html.zig"),
- .target = b.graph.host,
- }),
- });
-
- const run_generate_html = b.addRunArtifact(generate_html);
- run_generate_html.setCwd(b.path("")); // make sure we always run from buildroot
+ const run_webgen = webgen.installHtmlStep(b);
+ run_webgen.addDirectoryArg(b.path("src"));
const bundle_html = b.addSystemCommand(&[_][]const u8{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" });
- bundle_html.step.dependOn(&run_generate_html.step);
+ bundle_html.step.dependOn(&run_webgen.step);
b.getInstallStep().dependOn(&bundle_html.step);
const serve = b.addSystemCommand(&[_][]const u8{ "lighttpd", "-Df", "util/lighttpd.conf" });
@@ -23,6 +15,4 @@ pub fn build(b: *std.Build) void {
const publish_to_prod = b.step("publish", "Publish the website to production");
publish_to_prod.dependOn(b.getInstallStep());
-
- b.getInstallStep().dependOn(&webgen.installHtmlStep(b).step);
}