evidence
evidence copied to clipboard
Sidebar: Sorting, Hiding, Custom Naming
Feature Description
Multiple users have asked for more control over the sidebar. The sidebar currently works as follows:
- All first and second level pages/directories are displayed on the sidebar, with the exception of parameterized pages. Except for this bug
-
The name is taken from the markdown/directory file name: it the Proper Case version eg :
my-page.md-> My Page - Directories are shown before Pages
- Sort is alphabetical
Goals of Feature
Still have sensible defaults (as above) but the ability to override the following:
- Custom page sorting: Determine the order in which pages / directories are shown
- Custom page naming: Give the page a name different to the filename. Support anything in Unicode if possible
- Hide from sidebar: Remove a page from display in the sidebar
- (Maybe) Ability to totally hide sidebar: This may fall into a separate feature
Current Solution
Limited sorting is possible by prefixing file names with alphabetically sorted prefixes eg:
1.charlie.md
2.alice.md
3.bob.md
But these prefixes appear in the sidebar, which is not ideal, and directories will still sort before pages, irrespective of their alphabetical rank.
Examples/Screenshots
Possible implementation options:
- Some kind of YAML / json file where you configure this for the whole project
- Use markdown frontmatter for each individual page