From d18a77969196692e5a405990541ba896731dac3c Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 9 Feb 2026 10:44:52 +0100 Subject: refactor root generator loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- src/main.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index f47bd36..dfcedfa 100644 --- a/src/main.zig +++ b/src/main.zig @@ -93,6 +93,10 @@ pub const Context = struct { } }; +// TODO: make index smarter, it should know which files reference each other. +// with this information, we could make better decisions whether to generate +// output. +// fn index(ctx: *Context) !void { // avoid reindexing if ((ctx.pages.items.len != 0) and (ctx.markdown.items.len != 0)) return; @@ -126,6 +130,8 @@ fn index(ctx: *Context) !void { std.log.debug("Indexing {s}", .{e.path}); try ctx.markdown.append(ctx.allocator(), try ctx.allocator().dupe(u8, e.path)); } + + // XXX: scan for refs here? }, else => {}, } -- cgit 1.4.1