protoc-gen-doc icon indicating copy to clipboard operation
protoc-gen-doc copied to clipboard

Add hugo markdown example

Open muhlemmer opened this issue 4 years ago • 1 comments

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.

muhlemmer avatar Oct 07 '21 18:10 muhlemmer

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?

pseudomuto avatar Feb 18 '22 17:02 pseudomuto