-
My use case is to deploy a documentation site in a container in any customer's environment, so I can't actually know the production url at build time. It seems like I have to specify the url at build time, unless I use Node.js to serve the site and build the site in the container on first launch, which is not ideal. I would like to serve the site statically via nginx, but I'm not finding a way to do that without knowing the url up front. Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Docusaurus is a static site generator, and for various SEO-related features (such as canonical URL, x-hreflang meta), the full URL (including the domain) must be in the generated HTML pages. If you don't care about SEO and similar features, you can just use the exact same site URL for all your website deployments, and it should work fine. You can even use If you care about SEO, you'd rather use the correct URL in config, for each deployment. |
Beta Was this translation helpful? Give feedback.
Docusaurus is a static site generator, and for various SEO-related features (such as canonical URL, x-hreflang meta), the full URL (including the domain) must be in the generated HTML pages.
If you don't care about SEO and similar features, you can just use the exact same site URL for all your website deployments, and it should work fine. You can even use
https://example.com
if you want. Just be aware that this is bad for SEO reasons, but maybe you don't care.If you care about SEO, you'd rather use the correct URL in config, for each deployment.