You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the console error message carefully (if applicable).
Description
Hi,
When baseUrl is set to "/", and I'm building the website on gh-pages, the CSS does not load properly and an error message suggests that I use /docs/ as baseURL.
I have to use /docs/ as baseURL to get the site to load properly, but I shouldn't have to (URLs become doc4d.github.io/docs/docs, not an efficient URL).
Your environment
Public source code:
Public site URL:
Docusaurus version used:
Environment name and version (e.g. Chrome 89, Node.js 16.4):
Operating system and version (e.g. Ubuntu 20.04.2 LTS):
Self-service
I'd be willing to fix this bug myself.
The text was updated successfully, but these errors were encountered:
I have to use /docs/ as baseURL to get the site to load properly, but I shouldn't have to
Yes you should
The site is hosted on /docs/ baseurl, so as documented in the gitHub deployment doc, and as the error message suggest, you raally have to use that baseUrl in your site config.
(URLs become doc4d.github.io/docs/docs, not an efficient URL).
I don't know what you mean by "not efficient URL, but /docs/docs is a perfectly fine URL:
GitHub pages uses /repoName/ by default as a baseUrl (unless you use an organization): you can name your repo something else than "docs" if you want something else
Docusaurus docs use /docs/ as prefix for all docs, but you can rename or replace it by /
Note: In theory, /docs/docs is perfectly valid. In practice we have a bug with /docs/docs, and so you should avoid that, see #6294
I'd advise you to name your github repo something else than "docs", or using a better host like Vercel/Netlify.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Hi,
When baseUrl is set to "/", and I'm building the website on gh-pages, the CSS does not load properly and an error message suggests that I use /docs/ as baseURL.
Reproducible demo
No response
Steps to reproduce
This does not happen in a local environment.
See this commit for more details
doc4d/docs@aeb0799
Expected behavior
The site builds correctly
Actual behavior
The site displays an error message
I have to use /docs/ as baseURL to get the site to load properly, but I shouldn't have to (URLs become doc4d.github.io/docs/docs, not an efficient URL).
Your environment
Self-service
The text was updated successfully, but these errors were encountered: