Skip to content

Serve favicon and logo assets under /assets/#33

Merged
ericmj merged 1 commit into
mainfrom
favicon-served-from-root
Jun 8, 2026
Merged

Serve favicon and logo assets under /assets/#33
ericmj merged 1 commit into
mainfrom
favicon-served-from-root

Conversation

@ericmj

@ericmj ericmj commented Jun 8, 2026

Copy link
Copy Markdown
Member

The favicon set and the logo lived under /favicon/ and /images/, but the hexdocs compute service treats the apex //... namespace as package doc redirects. Requests like /favicon/favicon.svg and /images/hexdocs-logo.svg were 301-redirected to .hexdocs.pm and bounced back instead of being served directly.

Serve them under /assets/ instead, which the compute service reserves so the prefix is served straight from the bucket with no redirect. favicon.ico stays at the root since browsers request it there implicitly.

Also point the 404 page at the favicon set instead of the nonexistent /favicon.png.

The favicon set and the logo lived under /favicon/ and /images/, but the
hexdocs compute service treats the apex /<name>/... namespace as package doc
redirects. Requests like /favicon/favicon.svg and /images/hexdocs-logo.svg were
301-redirected to <name>.hexdocs.pm and bounced back instead of being served
directly.

Serve them under /assets/ instead, which the compute service reserves so the
prefix is served straight from the bucket with no redirect. favicon.ico stays
at the root since browsers request it there implicitly.

Also point the 404 page at the favicon set instead of the nonexistent
/favicon.png.
@ericmj ericmj merged commit 0f7d769 into main Jun 8, 2026
2 checks 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.

1 participant