question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  1. Create a docs/introduction.md page
  2. Configure @docusaurus/plugin-content-docs with homePageId: 'introduction'
  3. 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

  1. Clone https://github.com/ark120202/moddota.github.io
  2. Checkout docusaurus-issue-home-page-sidebar branch
  3. Run npm ci
  4. Run npm run start and go to http://localhost:3000/
  5. Click on the Introduction label in the sidebar

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
lex111commented, May 29, 2020

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.

0reactions
ark120202commented, May 29, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found