A GitHub App built with Probot that runs markdown-toc
Teams often use GitHub to manage documentation. As that documentation grows navigation can become a challenge, leading to the addition of a table of contents (ToC). As the documentation is modified team members must take care to ensure the ToC links are properly nested and formatted, which can create a barrier to contribution.
This app examines each push operation for markdown files formatted to use markdown-toc
. When such files are found, toc-me
regenerates a new ToC for the file and inserts it in the configured location.
The probot deployment docs can be followed to deploy your own version of toc-me
. You will need to define an additional environment variable APP_NAME
and populate it with the exact name of your GitHub App.
toc-me
will run on properly configured markdown files
Edit your markdown file to include the following line where you would like the ToC inserted:
<!-- toc -->
toc-me
will automatically update a ToC previously generated by the app.
toc-me
supports the optional use of a toc.yml
configuration file in the .github
directory of repositories in wihch the app is installed. Parameters supported by markdown-toc can be defined in the file.
For example:
append: 'this string will be appended to the end of the ToC'
If you have suggestions for how toc-me
could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
ISC © 2018 Philip Holleran [email protected]