Repository navigation
fix: load site CSS, fonts and images on any host - #178
Merged
Merged
Conversation
Zola writes absolute links from base_url, so a preview loaded its CSS, fonts and images from renderd.xyz. Previews now use VERCEL_URL, and RENDERD_BASE_URL can set the address for production while DNS is not ready.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pages now link to assets and to each other with root-relative paths, so the site renders on the vercel.app address and on renderd.xyz alike. Only the canonical, og and sitemap URLs stay absolute on renderd.xyz. No env var is needed on Vercel.
Ad1th
added a commit
that referenced
this pull request
Oct 21, 2026
fix: load site CSS, fonts and images on any host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: every page linked its CSS, fonts and images at https://renderd.xyz. That domain does not resolve yet, so the vercel.app address showed raw, unstyled HTML with broken images.
After: pages link to assets and to each other with root-relative paths (/css/site.css, /img/..., /download/). The site renders the same on vercel.app, on renderd.xyz, and on any preview address, with no env var on Vercel.
How: templates use plain root-relative paths, and the stylesheet keeps its cache-busting hash through get_hash. Canonical, og:url, og:image, JSON-LD and the sitemap stay absolute on renderd.xyz. build.sh drops the preview base_url logic (RENDERD_BASE_URL still overrides). CI lychee gets --root-dir for root-relative links, and Lighthouse now serves the same build output Vercel serves. Checked locally: build, word check, lychee (0 errors), Lighthouse budgets all pass, and a screenshot at 127.0.0.1 renders styled.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdYRveYEpgKhTgwUm6XbFW