Skip to content

`toc` scans your markdown folders and automatically generate SUMMARY.md

Notifications You must be signed in to change notification settings

hitzhangjie/toc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toc

introduction

Program toc scans your markdown directory and automatically generates SUMMARY.md, you can use it in this way:

toc [-d <dir>] > SUMMARY.md

It is useful when you organize markdowns in different folders, similar cases are gitbook, hugo, etc. By toc we don't need to manually write SUMMARY.md now.

toc will rewrite SUMMARY.md according to your filesystem hierarchy, and liquid tag weight in same folder.

For example, if we have following files:

.
|-1
  - 1.1
  - 1.2
|-2
  - 2.1
  - 2.2

then toc > SUMMARY.md will generate following content:

file: SUMMARY.md

# Summary
---
headless: true
bookhidden: true
---

* [1](1)
  * [1.1](1.1)
  * [1.2](1.2)
* [2](2)
  * [2.1](2.1)
  * [2.2](2.2)

Hope toc could ease your hand!

installation

Just run go get -u github.com/hitzhangjie/toc.

About

`toc` scans your markdown folders and automatically generate SUMMARY.md

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages