Skip to content

[feature request] sidebar item add collapse and expand #728

Closed
@Wsine

Description

@Wsine

Appreciate for the work of this project.

I know it seems rule to ask for such feature and maybe it is "impossible" to implement. But, how if user provides directories structure in _sidebar.md file.

for example _sidebar.md

- FolderName
  - [Article1](/FolderName/Article1.md)
  - [Article2](/FolderName/Article2.md)
- FolderName2
  - [Article3](/FolderName2/Article3.md)
  - [Article4](/FolderName2/Article4.md)

The original demand comes from that i want to construct my personal blog with doscify. However, the sidebar is as long as my article amount.

I found that i can write a bash script to help me scan my folders and then generate a sidebar file. such as
find . -mindepth 2 -name "*.md" | awk -F'/' 'BEGIN {RS=".md"} {arr[$2]=arr[$2]"\n - ["$3"](/"$2"/"$3")"} END {for (key in arr) print "- "key, arr[key]}' > _sidebar.md
what's more, travis ci can help us do such a job.

so, can docsify add a toggle feature for no hyperlink item in the sidebar? it is ok for adding it into configurable options.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions