content plugins reject options.routeBasePath = ''
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
When I use default preset options
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
pages: {
path: 'src/pages',
routeBasePath: '',
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
exclude: [
'**/_*.{js,jsx,ts,tsx,md,mdx}',
'**/_*/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/__tests__/**',
],
mdxPageComponent: '@theme/MDXPage',
remarkPlugins: [require('remark-math')],
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
},
},
],
],
};
It pointed out that ValidationError: "routeBasePath" is not allowed to be empty
Self-service
- I’d be willing to address this documentation request myself.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
plugin-content-docs | Docusaurus
You can configure this plugin through the preset options. ... routeBasePath, string, 'docs', URL route for the docs section of your site.
Read more >plugins/reject-private-submit - Git at Google
This plugin will simply reject to submit (merge) any private changes. Powered by Gitiles| Privacytxt json.
Read more >Reject bad password - WordPress.org
I have the password and confirm_password fields enabled and wish to be able to allow the user to specify a password when registering...
Read more >WPPizza – Confirm|Reject|Notify
Any errors generated can be found in the main wppizza plugins /log directory ... (short for Confirm, Reject, Notify) to set options as...
Read more >21.1.0 API Reference - hapi.dev
The server options control the behavior of the server object. ... Merges an object into to the existing content of server.plugins[name] where:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, I’ll agree with that stance. Well, I’ll prefer to normalize—I know it was previously used as a “multiple root plugins” hack, which is why I don’t like
""
; but if we always normalize, I do prefer the non-erroring side.I don’t even remember what this issue is exactly but I don’t think it hacks around anything if we normalize ‘’ to ‘/’ anyway.
‘/’ works so if we normalize ‘’ to ‘/’ there won’t be issues, it would work as if user provided “/” 🤷♂️
To me using “docs” (default plugin routeBasePath value) instead of “/docs/” is not particularly more semantically wrong than using ‘’ instead of ‘/’.
routeBasePath
is somehow the “plugin baseUrl”. It made sense to me to be consistent betweenbaseUrl
androuteBasePath
Now I didn’t notice but we actually don’t accept
baseUrl: ''
. I thought we did normalize it to “/” already, but instead it prints an error message:I suggest either:
baseUrl
androuteBasePath
, eventually emit a warning saying the value should rather be ‘/’baseUrl
androuteBasePath
with a clearer error message explaining to use ‘/’ instead (+ fix docs using ‘’)The first option looks better to me, as users will intuitively try to use ‘’.
Do we want to throw on start while we could handle the bad value more gracefully?
Heck, we could even accept null/false here 🤷♂️