Adding docs home page to the sidebar
See original GitHub issue🐛 Bug Report
Trying to include a home page in the sidebar makes it point to a non-existing original URL.
Note: previously I have added is as a href link, however sidebar presence on the home page wasn’t stable, and it never appears in 2.0.0-alpha.56 (apparently because of #2785).
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
- Create a
docs/introduction.md
page - Configure @docusaurus/plugin-content-docs with
homePageId: 'introduction'
- Add
"introduction"
to the sidebars file
Expected behavior
Add an Introduction
element to the sidebar, that points to the routeBasePath
.
Actual Behavior
The link is created, however it points to /introduction
page, which doesn’t exist.
Your Environment
- Docusaurus version used: 2.0.0-alpha.56
- Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Chrome 81.0.4044.138, Node.js 14.3.0
- Operating system and version (desktop or mobile): Arch Linux
Reproducible Demo
- Clone https://github.com/ark120202/moddota.github.io
- Checkout
docusaurus-issue-home-page-sidebar
branch - Run
npm ci
- Run
npm run start
and go to http://localhost:3000/ - Click on the
Introduction
label in the sidebar
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Configure your sidebar and navigation gadget - Google Sites
Locate your sidebar, then click the + button next to the sidebar header. A dialog will appear with a list of all the...
Read more >Table of contents in Google Docs showing in sidebar, how do I ...
I have created a table of contents in google docs. I have followed instructions to click where I want the table to contents...
Read more >The new Google Docs sidebar add-on. FAQ for Paperpile ...
The sidebar gives you a better overview of existing citations in a document and makes it easier to cite multiple papers from the...
Read more >3 Ways To Create A Sidebar On Google Docs - TheNina.com
One way to create a sidebar on Google Docs is to use the table of contents feature. To do this, simply click the...
Read more >Use sidebars in Pages on Mac - Apple Support
Right sidebar: Click Format or Document in the toolbar to open the sidebar and show the controls. To close the sidebar, click the...
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
Fine, thus, for example, the document id of
introduction
is set as the docs home page (homePageId: 'introduction'
), then the route for it will not be generated (docs/introduction
), and its contents will be available by the docs home page route (/docs
). I will try to ship it to the next release.Yeah, I think it makes sense to have no non-canonical route at all. Even if sidebar would include only canonical url, it still might be linked manually, making Google still index it