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:
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:https://papermc-feat-add-trial-chamb.papermc-docs.pages.dev
https://zlataovce-fix-highlight-cont.papermc-docs.pages.dev
https://papermc-121.papermc-docs.pages.dev