-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
Description
Hello,
thanks for the tool.
There's one feature I'd really like in it: the ability to directly manipulate a Markdown file and inserting the TOC in a specific place, in order to make the update automatic.
Let's suppose a README.md like
## Hello
asdasdasd
## Table Of Contents
xyahdyshasyhd
### Other title
I'd like to do something like
gh-md-toc insert-toc-at "Table Of Contents" README.md
And I would get on stdout the FULL README.md, with whatever was inside the "Table Of Contents" replaced by the TOC:
## Hello
asdasdasd
## Table Of Contents
* [Hello](#hello)
* [Table Of Contents)(#table-of-contents)
* [Other title](#other-title)
### Other title
I suppose I could achieve a similar result in bash with awk/sed/similar tools, but IMHO this feature would be quite in line with gh-md-toc purpose.
I'm no go expert, but if you think you don't have time to do it but you would accept a PR for it, I can try coding it myself.
sebdah, axelson, ajunior, pbnj and LebJe