Skip to content

Automatic generation of page index in Sidebar at runtime #1735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
paulhibbitts opened this issue Jan 26, 2022 · 1 comment
Closed

Automatic generation of page index in Sidebar at runtime #1735

paulhibbitts opened this issue Jan 26, 2022 · 1 comment

Comments

@paulhibbitts
Copy link
Collaborator

paulhibbitts commented Jan 26, 2022

Feature request

What problem does this feature solve?

When using Docsify to quickly put together a smaller collection of MD pages the creation, and then updating, of the Sidebar can be additional effort with little benefit

What does the proposed API look like?

How should this be implemented in your opinion?

This issue has been discussed before (i.e. #1290), and the ordering of pages often comes up. As described in issue #1290 a default sort on MD file name looks promising. This would give user control of the sort order, and likely support using numerical prefixes to help auto-sort pages. For example, 01-Chapter 1, 02-Chapter 2, etc.

Might this be able to be created as a Plugin?

Are you willing to work on this yourself?

Unfortunately I do not have the needed developer skills but I'd be more than happy to help test, share ideas, etc.

@trusktr
Copy link
Member

trusktr commented Jan 26, 2022

Hey @paulhibbitts, thanks for the idea, although static websites can't inspect files from a server, so this is not possible as a runtime thing for static web sites without support from a server that exposes an API endpoint for the client to receive specific information.

In #1290 I linked to the CLI feature @sy-records added recently for generating a sidebar. To automate this, someone can run it manually, or they can run it in a GitHub action, etc.

@trusktr trusktr closed this as completed Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants