pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.59k stars 462 forks source link

Add hugo markdown example #458

Closed muhlemmer closed 1 year ago

muhlemmer commented 2 years ago

This change adds an example template for a Hugo specific Markdown output. Hugo is a static site generator: https://gohugo.io.

The new example template is a copy from resources/markdown.tmpl. Mostly updated for the way Hugo expects links to be defined, with some additional comments on how to use this template:

This template outputs markdown as used by Hugo (https://gohugo.io) static site generator.
It is based on the original markdown.tmpl from the protoc-gen-doc project.

The generated markdown should be put somewhere under the content folder from your Hugo site.
For example:
protoc --doc_out=./doc --doc_opt=hugo-md.tmpl,<hugo_site>content/protoc/index.md proto/*.proto

Then, the hugo development server should pick it up and serve the page at locahost:1313/protoc/,
in its default configuration.

I currently use this exact template in my own project to include generated protoc into my Hugo site.

pseudomuto commented 2 years ago

Rather than adding templates for Hugo (and later each other kind of thing), do you think it would be sufficient to add a page to the wiki?