PaperMC / docs

Documentation for all projects under the PaperMC umbrella.
https://docs.papermc.io/
BSD 2-Clause "Simplified" License
43 stars 112 forks source link

fix: correct base URL for Pages deployments #429

Closed zlataovce closed 5 months ago

zlataovce commented 5 months ago

Fixes broken metadata and makes the sitemap generate once again. To me, it seems like there's no way to get a deployment URL at build time, so this PR tries to guess it for previews.

Based on my observations, deployment URLs are formatted in the https://<id>.papermc-docs.pages.dev format, where <id> is a <PR head branch owner>-<branch name> identifier capped to 28 characters and special characters (/, _, .) replaced with a dash. Examples:

github-actions[bot] commented 5 months ago
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
papermc-docs ✅ Ready (View Log) Visit Preview ffe9ac5e5889227d3ea2877271b9faacf08f94ea