Repository navigation
chore(docs): configure site URL in Astro config - #3963
Conversation
✅ Deploy Preview for atlassify canceled.
|
Code Review ✅ Approved🟡 Medium risk · Setting Astro’s site origin changes generated absolute URLs, and an incorrect origin could produce broken canonical, social, RSS, or sitemap links. Sets Astro VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
🎉 This pull request is included in Atlassify v3.17.1! 🎉 Downloads for macOS, Windows, and Linux are available on the release page. Thanks for helping make Atlassify better! |
Summary
Sets
siteindocs/astro.config.tstohttps://atlassify.io, sourced fromsiteMetadata.urlso there is a single source of truth.Why
Astro needs
siteto generate absolute URLs. Without it,Astro.siteandAstro.urlhave no origin, which prevents canonical links,og:url,og:image, RSS and sitemap generation from resolving correctly.This is the prerequisite for making page-level metadata work and for adding a sitemap later, if the site ever needs one.
Notes
base = docs) is unaffected.siteMetadata.urlalready drivesog:urlindocs/src/layouts/Layout.astro, so no new value was introduced.pnpm buildandpnpm lint:checkindocs/.Follow-up (not in this PR)
docs/src/layouts/Layout.astrohardcodesog:urlto the site root and does not emit a<link rel="canonical">. Withsiteset, both can become page-aware viaAstro.url.