Skip to content

feat(render): embed favicon in local preview HTML - #138

Merged
scott merged 1 commit into
mainfrom
feat/137-preview-favicon
Sep 25, 2026
Merged

scott merged 1 commit into
mainfrom
feat/137-preview-favicon

Conversation

@scott

@scott scott commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Embed a 32×32 PNG of the bird + document mark (favicon.png) and inline it as a data URI in themeHead / buildHTML.
  • Local preview tabs (gander <file>, gander --watch, -outfile) show the gander favicon without fetching /favicon.ico, which would break file:// and -outfile.

Related Issue

Closes #137

Testing

go test ./...
go vet ./...
go build ./...
CGO_ENABLED=0 go build -o /tmp/gander-137 .

All green. TestBuildHTMLFavicon pins rel="icon", data:image/png;base64,, the embedded bytes, and the absence of /favicon.ico.

Notes

Hosted gander.md pages are gandermd/gandermd#152. This PR does not add a /favicon.ico route on the runner.

Inline a 32x32 PNG as a data URI in buildHTML so file://,
-outfile, and --watch tabs show the gander mark.

Closes #137
@scott
scott merged commit 8563d7d into main Sep 25, 2026
1 check passed
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.

feat: add favicon to local CLI preview HTML

1 participant