I think would like to leverage Hugo’s system of partials, includes, shortcodes, internationalization, themes, etc. to unify the well-factored, functionally separate Markdown assets to produce “integrated” markdown files. Example:
Source:
# Markdown is Great
* yes!
* si!
{ partial "copyright.html" . }
Desired Output:
# Markdown is Great
* yes!
* si!
Copyright Yo Hugo Press Inc. [our site](http://example.com/copyright)
I do not want to go that additional step that turns that output ^^^^ HTML. From a stream metaphor, I’d like to shunt the output out before it goes through the markdown pipe.
Questions:
Is this a sensible thing?
By dropping the HTML capability, and I losing so much of the Hugo goodness that I might as well just roll my own document synthesis app?
Is what a sensible thing? The task you’ve asked about? Why are you doing it? Then maybe we can say.
Yes. But Hugo uses other libraries and such to do it’s thing, and the source is free, so that shouldn’t be too much pain. But, if you do figure it out, you can just pin it to that version of Hugo, and keep the binary, and you will be set for life!
I don’t know. I kinda make text files for gopher sites with custom outputs, and you could turn off HTML output and probably be most of the way there.
Actually, if the idea is to produce markdown code from a shortcode, I’m pretty sure it can be done by setting a new custom output format called .mdown or something like that.
The result would be the markdown files without any frontmatter.
I think I might have misdirected this discussion by trying to provide an example. Let me try to be more plain.
Ultimately I want the benefit of writing source material in markdown and emitting, markdown (not HTML). I want to leverage all the brilliance of Hugo’s variables and theme structure, the partial directive, etc, but at the end of the day in the output directory e.g. public I want…markdown files.
Is that possible? Or is the idea of not rendering to HTML so foreign to Hugo that I’d be better off using a different framework?