From f175552dcd86cda7a7fcafc1db211084fabd65a0 Mon Sep 17 00:00:00 2001 From: Rosa Date: Wed, 27 May 2026 02:56:07 -0400 Subject: actually did a bit of writing --- build.zig | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'build.zig') 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); } -- cgit v1.3.1