项目作者: harsilspatel

项目描述 :
A github probot to generate table of contents for markdown files 🤖
高级语言: JavaScript
项目地址: git://github.com/harsilspatel/contents.git
创建时间: 2019-03-23T17:03:03Z
项目社区:https://github.com/harsilspatel/contents

开源协议:ISC License

下载


contents

🤖 Contents helps generate table of contents with ease.

GIF 🎞



Usage 🖱

  1. Install the Contents GitHub App.
  2. Create your markdown(s).
  3. Open a new issue.

Manual 📜

Arguments Description Default
—path relative path of the markdown file from the root of the repo README.md
—ref The name of the commit/branch/tag master branch


WIP 🚧

As of now, the bot creates a comment of the table-of-contents in the opened issue. Thereafter, the user has to perform the laborious task of copying the contents, navigating to the file in the correct branch, and pasting it.

However, the functionality can be further streamlined by:

  1. Creating a branch from the inputted branch
  2. Prepending the file with it’s table-of-contents
  3. Creating a pull request from new branch to the inputted branch
  4. Creating a comment referencing the PR in the opened issue.

Thereafter, the user has to simply review the PR and merge it.

Motivation 💡

When I took the initiative to convert the Wired Constitution from .docx to .markdown, it dawned upon me that the generation of ToC should be automated and that’s when I set out on the mission to address the issue :D