Closed rlamana closed 4 years ago
Sorry our previous docs-only instructions were incorrect. We've updated it but have yet to publish it - https://v2.docusaurus.io/docs/next/configuration/#docs-only-mode
As I've got lost multiple times during several month to find this modification, I would like to add a note: as of 2.0.0-beta.0 (and 2.0.0-beta.1), the URL is at https://docusaurus.io/docs/docs-introduction#docs-only-mode
I'm also experiencing this issue locally with the setup above/in the docs:
module.exports = {
baseUrl: "/docs/",
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
path: "docs",
routeBasePath: "/",
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
Which works completely fine in development, but with build && serve
will output
@joe-bell this is a bug: https://github.com/facebook/docusaurus/issues/3291
To fix it locally you could probably move build
to build/docs
and run docusaurus serve
again
Thanks for the quick response @slorber – moving the directory certainly seems to do the trick for now
In the meantime, I'll stick with:
docusaurus build --out-dir build/docs
I'm getting the same error at: https://blc-bit.github.io/notes/
Can anyone help?
GitHub repo: https://github.com/blc-bit/notes
@sanamhub Your site is working perfectly. What's the error? What's your desired effect?
Please don't necropost under a super-old issue. It's obviously resolved and irrelevant to your issue.
@sanamhub Your site is working perfectly. What's the error? What's your desired effect?
Please don't necropost under a super-old issue. It's obviously resolved and irrelevant to your issue.
I fixed it, thanks anyway!
@sanamhub Your site is working perfectly. What's the error? What's your desired effect? Please don't necropost under a super-old issue. It's obviously resolved and irrelevant to your issue.
I fixed it, thanks anyway!
how did you fix it?
how did you fix it?
I can't recall as of now 😞
Just for people facing the same issue. Deleting baseUrl
, building and putting back, removed the issue for me, lol.
Maybe a cache error somewhere.
🐛 Bug Report
A docusaurus site (v2) without a landing page and documentation as the index page does not work if
baseUrl
is other than/
.It seems like
@docusarus-utils
.normalizeUrl
is generating double forward slashes whenrouteBasePath
is set to a single '/' in the docs plugin configuration.For a
baseUrl: 'metro/'
anddocs.routeBasePath: '/'
the generated routes are:When navigating to
/metro/next/blog
, react-router finds no match and the "Page not found" message is loaded instead.Have you read the Contributing Guidelines on issues?
Yes.
To Reproduce
Using docusaurus'
website/
in the repository as an example:baseUrl
to/metro/
in yourdocusaurus.config.js
.routeBasePath
to/
in the@docusaurus/preset-classic.docs
section of yourdocusaurus.config.js
.yarn start
https://localhost:3000/metro/introduction
Expected behavior
https://localhost:3000/metro/introduction
should have loaded the Introduction page (in docs/introduction.md), just likehttps://localhost:3000/docs/introduction
loads it when baseUrl and routeBasePath have their default values.Your Environment