aboutsummaryrefslogtreecommitdiff
path: root/util/pages.zig
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-05-12 13:49:45 -0400
committerRosa <rosaontheweb@proton.me>2026-05-12 13:49:45 -0400
commit1f0749100b22c17272b4d294e1db3034097b57ea (patch)
tree9f007328080aec23a685d6c9062a9192fac769cf /util/pages.zig
parent6143a710c142cf6704527ae32a7c90c02e83fe4a (diff)
start work on template api
Diffstat (limited to '')
-rw-r--r--util/pages.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/pages.zig b/util/pages.zig
new file mode 100644
index 0000000..13d62a1
--- /dev/null
+++ b/util/pages.zig
@@ -0,0 +1,16 @@
+const std = @import("std");
+
+pub const Template = struct {
+ file: std.Io.File,
+
+ pub fn init(io: std.Io, dir: std.Io.Dir, sub_path: []const u8) !@This() {
+ const file = try dir.openFile(io, sub_path, .{});
+ return .{ .file = file };
+ }
+
+ pub fn replacePlaceholder(template: *Template, key: []const u8, content: []u8) void {
+ _ = template;
+ _ = key;
+ _ = content;
+ }
+};