Docsify: Sidebar not generated based on .md files in the /docs folder

Created on 23 Dec 2017  路  6Comments  路  Source: docsifyjs/docsify

Docs: https://docsify.js.org/#/more-pages

By default, the table of contents in the sidebar is automatically generated based on your markdown files.

10 seconds YouTube video https://www.youtube.com/watch?v=O1hlHow0xXw


Potential duplicate: #157

Reason for opening a new issues - VISIBILITY - ever though previous issue was closed I don't seem to find a solution.

Manually adding...

<!-- docs/_sidebar.md -->

- [Home](/)
- [Guide](guide.md)

...and setting . loadSidebar: true seems cumbersome, I would imagine sidebar should be generated automagically, just like the overall philosophy of the docs?

Most helpful comment

Hey, it's all good, thank you for great work.

My reasoning...

The moment we use phrase Custom sidebar it suggest there is a sidebar created by default.

No such thing, no default sidebar, the _sidebar.md is obligatory.

Chances are users want to navigate between files.

OUCH chances are users want to have single long documentation file...

OK. At least I've learnt something.

All 6 comments

I think it should be my English did not express clearly.
My meaning is that the TOC in the article are automatically generated.

I see, headers are populated automatically.

Is it possible to populate list of pages automatically? (with an optional ordering)

image

This is impossible.

First, We can not get your list of files from the static server, so it is not dynamically generated.
Second, Perhaps we can automatically generate locally and write to _sidebar.md, but we do not know the order of the documents what you wanted.

There are currently no documentation tools that provide this feature and I think it is better to manually maintain the _sidebar.md.

Thank you for clarifying. Technical limitation of fetching list of the files.

docsify serve docs If _sidebar.md is not present, it could create _sidebar-autogen.md

That could run locally, with access to the list of files.

We can not know the list what the user wants. Sorting rules in alphabetical order, or create time? Do users need to include subdirectories?
Documents are not blogs, not simply files sorted by time. This automatic feature does not make sense.

Hey, it's all good, thank you for great work.

My reasoning...

The moment we use phrase Custom sidebar it suggest there is a sidebar created by default.

No such thing, no default sidebar, the _sidebar.md is obligatory.

Chances are users want to navigate between files.

OUCH chances are users want to have single long documentation file...

OK. At least I've learnt something.

Was this page helpful?
0 / 5 - 0 ratings