Skip to content

A CLI too to generate _sidebar.md for docsify recursively.

License

Notifications You must be signed in to change notification settings

Johntng/sidebar-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sidebar-generator

This is a CLI tool to generate the _sidebar.md file for docsify directories recursively.

To understand what is docsify, please refer to docsify.
To understand why you need the sidebar-generator, please refer to docsify sidebar.

Installing and using

To install sidebar generator:

npm i @johntng/sidebar-generator

To uninstall:

npm un @johntng/sidebar-generator

To use the sidebar-generator, simply type in the folder you want to generate the _sidebar.md file:

sidebar-generator

If the '_sidebar.md' file already exist, you will be prompt to overwrite it:

? Do you want to overwrite the _sidebar.md file? (Use arrow keys)
❯ No 
  Yes 

List of arguments

Run the cli with -h for more options

sidebar-generator -h

Output:

Options: 

Default options:
'depth' is 5
'sort' is off by default
'overwrite' is off by default

--help, -h 		 Display help.
--depth, -d [Number] 	 Set the depth of the directory to recursive to find *.md files.
			 Depth 0 means it will NOT recurse.
--sort, -s 		 Option to sort the the *.md files in alphabetical order.
--overwrite, -o 	 If this option is set, it will overwrite the _sidebar.md file if exist.

About

A CLI too to generate _sidebar.md for docsify recursively.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published