about summary refs log tree commit diff
path: root/src/gen.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gen.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gen.zig b/src/gen.zig
index 96c31a3..3e5fa9b 100644
--- a/src/gen.zig
+++ b/src/gen.zig
@@ -111,8 +111,8 @@ fn genSite(ctx: *Context) !void {
 
 // build a single html file
 fn build(allocator: std.mem.Allocator, w: std.io.AnyWriter, page_name: []const u8, srcpath: []const u8) !void {
-    const mtime = try fs.getMtime(srcpath);
-    const mtime_str = try fs.formatMtime(allocator, mtime, "%F");
+    const mtime = try (fs.getGitTime(srcpath) catch fs.getMtime(srcpath));
+    const mtime_str = try fs.formatTimespec(allocator, mtime, "%F");
     defer allocator.free(mtime_str);
 
     // HEAD