muesli / markscribe

Your personal markdown scribe with template-engine and Git(Hub) & RSS powers 📜

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature idea: Parsing markdown

simenandre opened this issue · comments

Hello! Thanks for an awesome command!

I came over this looking for something that could generate a list of ARDs in our documentation repository. Basically, there is a folder named ard/ in our repository, they are all regular Markdown documents. For anyone in the project, this should be indexed easily, and IMHO I don't think files named 00001-rewrite-to-perl.md are nice enough. I want them listed in our README.md and I think maybe this library could fix that with a nice feature addition.

Potensial use-cases

  • My ARDs 😅
  • Tutorials (let's say you have tutorials in docs/tutorials, you can display a list of them)
  • Documentation (parse list Markdown files in docs/)

I assume for this to work, Markdown files all must have # <title here>, so they can be parsed to {{.Title}}. A nice addition could be to implement Markdown Headers, variables from this could be in the template as well 🤓. Personally I don't like how Markdown headers are parsed on Github, but anyway.

Potential implementation

Template

# Some title about some Markdown files
{{range markdown "docs"}}
- [{{.Title}}]({{.Path}})
{{end}}

Output

# Some title about some Markdown files
- [Hello there](./docs/hello-there.md)

docs/hello-there.md

# Hello there

...

Sounds like a great idea!