Make PR preview links stay in the preview - #177
Open
rly wants to merge 2 commits into
Open
Conversation
Deploy previews built with the production baseURL, so every absolute link a template generated with .Permalink jumped from the preview to the live site. Netlify only injects the preview baseURL for a bare `hugo` command, and this project uses a custom one. Also correct the baseURL itself: production is GitHub Pages on the nwb.org custom domain, and neurodatawithoutborders.github.io 301s there over plain HTTP, so sitemap and RSS entries advertised a redirecting host. The two Online Resources cards that hardcoded that host point to the pages this site already builds. Fixes #176 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A Hugo error message sat above the front matter, so the delimiter was never at the start of the file. The page rendered the error text with an empty title, and the tool grid skipped the card because category and weight were unset. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for nwborg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
rly
marked this pull request as ready for review
September 3, 2026 07:03
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.
Fixes #176.
Deploy previews were built with the production
baseURL, so every.Permalinklink (news "Read More", homepage news cards, event cards, share links) pointed at the live site. Netlify only auto-injects the preview baseURL when the build command is a barehugo; this repo uses a custom one, sonetlify.tomlnow passes-b $DEPLOY_PRIME_URLfor deploy previews and branch deploys.Two follow-ons found while reviewing the hardcoded links:
hugo.yaml'sbaseURLwas stale. Production is GitHub Pages on thenwb.orgcustom domain, andneurodatawithoutborders.github.io301s there over plain HTTP, sositemap.xmland RSS advertised a redirecting host.content/tools/community/nwbview.mdhad a pasted Hugo error message above its front matter, so Hugo never parsed it. NWBView was missing entirely from the/tools/community/grid (nocategory/weight) and its page rendered the error text with an empty title. Broken since Update community tools pages #135.Event and news pages are deliberately untouched; their links to the old host are archival.
Verification
Built the site locally with Hugo 0.152.2 (the pinned version) and diffed the full 176-page output before vs. after. Every difference is either the
github.io→nwb.orgdomain swap or one of the three intended files. With-b $DEPLOY_PRIME_URL, news links resolve to the preview host; the tool grid gains an NWBView card.Worth clicking a news item's "Read More" on this PR's own preview to confirm.
🤖 Generated with Claude Code