Replies: 1 comment
-
Thanks! When you deploy a static site on a host under a baseurl, you generally deploy a subfolder containing that baseurl (for example And when you deploy Now, it's possible to configure hosts to serve
That's a different subject. The real question is: what is the canonical URL of your page (what Google sees and use as the "true" URL). You can link to that page with/without a trailing slash, but for consistency and SEO you'd rather always link to it through its canonical URL, which contains a trailing slash for the reasons above. Our Link component has If you really want |
Beta Was this translation helpful? Give feedback.
-
Hello there!
We recently moved our docs site from Gatsby to Docusaurus. I'd first like to say that we're very happy with the maintainability with our new site.
I would like to ask for reasoning behind the statement that baseUrl always has a trailing slash
For our application, we would like no trailing slashes. This was the setup in our app previous to the switch to Docusaurus. It worked in most cases, except in cases where a link pointed to our baseUrl. In all cases, the link will be
/docs/
with a trailing slash. The only way we found is to use a rawa
tag pointing to/docs
. (I think that is due to this code but I'm not certain)I understand why a baseUrl of
/
needs a trailing slash (pretty self evident) but I don't understand why a baseUrl of anything else requires one. Or, why a link to the baseUrl without a trailing slash is not allowed.Any advice or info here?
Beta Was this translation helpful? Give feedback.
All reactions