Skip to content

Fix/branding favicon initial html#1025

Merged
perber merged 3 commits into
mainfrom
fix/branding-favicon-initial-html
May 23, 2026
Merged

Fix/branding favicon initial html#1025
perber merged 3 commits into
mainfrom
fix/branding-favicon-initial-html

Conversation

@perber
Copy link
Copy Markdown
Owner

@perber perber commented May 23, 2026

No description provided.

perber added 2 commits May 23, 2026 16:21
Inject the current branding favicon into the initial SPA HTML so the app no longer starts with a hard-coded default favicon reference.

Keep the existing client-side favicon updates intact while moving the initial selection into the server-rendered frontend config path.
Copilot AI review requested due to automatic review settings May 23, 2026 15:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates LeafWiki’s initial HTML rendering so the favicon can be set from the server-side branding config (instead of always using the built-in /favicon.svg). This aligns the first page load with the configured branding, before the SPA runtime code has a chance to update the favicon.

Changes:

  • Replace the hardcoded favicon href in the UI index.html with a {{__FAVICON_HREF__}} placeholder.
  • Extend the backend FrontendConfig to provide the current branding favicon filename and inject the computed favicon href into served index.html.
  • Add a small helper (BuildFrontendFaviconHref) with unit tests to build the correct favicon URL with/without a base path.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
ui/leafwiki-ui/index.html Switch favicon link to a server-injected placeholder ({{__FAVICON_HREF__}}).
internal/wiki/wiki.go Provide GetFaviconFile via FrontendConfig from branding config.
internal/http/router.go Inject favicon href into HTML and add BuildFrontendFaviconHref.
internal/http/router_test.go Add tests for BuildFrontendFaviconHref.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/index.html Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@perber perber merged commit a8d5371 into main May 23, 2026
6 checks passed
@perber perber deleted the fix/branding-favicon-initial-html branch May 23, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants