diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-19 18:03:59 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-19 18:03:59 +0200 |
| commit | 65300a13dcd11037218bf8ba61efd8ca19e5920e (patch) | |
| tree | 7c65fcc708ec43be8386c31fec191ea8c0c9a1bf /src/zilch/App | |
| parent | b34ebbe68ce399bc754f2688845f380a7b47bd60 (diff) | |
add favicon
Diffstat (limited to 'src/zilch/App')
| -rw-r--r-- | src/zilch/App/root.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/zilch/App/root.zig b/src/zilch/App/root.zig index c2cc024..a7700d9 100644 --- a/src/zilch/App/root.zig +++ b/src/zilch/App/root.zig @@ -9,6 +9,7 @@ const Env = mod.Env; pub const Options = struct { name: []const u8, + favicon: []const u8, functions: []const Env.Function, globals: []const Global, components: []const Component, @@ -82,6 +83,7 @@ pub fn App(comptime options: Options) type { .root = .node("html", .{}, &.{ .node("head", .{}, &.{ .node("title", .{}, &.{.text(options.name)}), + .void("link", .{ .rel = "icon", .href = options.favicon }), .void("meta", .{ .name = "viewport", .content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0", @@ -114,7 +116,10 @@ pub fn App(comptime options: Options) type { }), }; - html: []const u8 = std.fmt.comptimePrint("{f}", .{node}), + html: []const u8 = str: { + @setEvalBranchQuota(100_000); + break :str std.fmt.comptimePrint("{f}", .{node}); + }, pub const init: @This() = .{}; }; |