Our documentation have a toc(table of contents) markdown file(shown at below), how can i parse it and then use them in layout template to render navigation part html.
i have tried use readFile function, but it’s hard to parse the level of titles in template syntax(which is limited golang syntax supported).
anyone have a good idea to handle this?
# xxx Documentation
## Documentation List
+ [About xxx](overview.md)
- [xxx Introduction](overview.md#xxx-introduction)
- [xxx Architecture](overview.md#xxx-architecture)
+ [xxx Quick Start Guide](./QUICKSTART.md)
- [About xxx](./QUICKSTART.md#about-xxx)
- [About This Guide](./QUICKSTART.md#about-this-guide)
- [Deploy a xxx Cluster](./QUICKSTART.md#deploy-a-xxx-cluster)
- [Try xxx](./QUICKSTART.md#try-xxx)
- [Monitor the xxx Cluster](./QUICKSTART.md#monitoring-a-xxx-cluster)
- [Scale the xxx Cluster](./QUICKSTART.md#scale-the-xxx-cluster)