jplatte / hinoki

A simple, yet very flexible static site generator.
GNU Affero General Public License v3.0
9 stars 2 forks source link

Pandoc as a content processor #10

Open jplatte opened 1 year ago

jplatte commented 1 year ago

This would allow writing content in a variety of different input languages / flavors of those languages (for instance it supports six different markdown flavors, ignoring one that's deprecated). It would also allow using advanced features that practically only exist inside pandoc such as embedding citations in markdown.

jplatte commented 1 year ago

I imagine this being a possible input for the process_content frontmatter / defaults field:

[process_content]
with = "pandoc"
from = "latex"
to = "html5" # make this the default?
jplatte commented 1 year ago

An alternative would be to run arbitrary commands on the content, so the above would become

process_content = { command = "pandoc --from latex --to html -" }

(assuming that the interface would simply be a text stream, no extra metadata being passed in either direction)