Replies: 1 comment
-
|
No it is not possible unfortunately, you have to use the correct base URL at build time and it affects many subtle things such as linking and SEO metadata. For example, the baseUrl (and site domain) is hardcoded in the static HTML pages we emit (it is not our choice, it's what Google requires us to do). To ensure what gets reviewed is what you deploy, you must use the correct baseUrl in both cases. But it's probably not a big deal if you use a different baseUrl for review and prod. Our broken link checker is likely to catch linking issues, but it may be annoying if your CI job fails only after merging the PR 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My use case for this is to have our CI pipeline build the site as part of the review process. So it generates the output and puts it into a GitLab artifact, which allows reviewers to see the actual built site before it gets deployed.
The problem here is that the GitLab artifact URL is very different too the actual final URL. Which means that it then doesn't render correctly and instead gives the "Your Docusaurus site did not load properly." error.
Specifically, the actual deployed URL will be:
/docs/whereas the review URL on GitLab will be:/-/<repo>/-/jobs/<jobId>/artifacts/build/docs/The only solution I've been able to come up with so far is:
But obviously this means that the site as seen by reviewers is not the site that gets deployed, which might cause other issues.
Is there a better way to achieve this so that the exact same build can be deployed to both?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions