From 65300a13dcd11037218bf8ba61efd8ca19e5920e Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 19 Oct 2026 18:03:59 +0200 Subject: add favicon --- src/zilch/App/root.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/zilch/App') 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() = .{}; }; -- cgit v1.2.3-70-g09d2