Does #Hugo support calling any kind of external command to produce/post-process output files these days?

I'd like to generate a Gemtext (geminiprotocol.net) version of my pages, but don't see how I'll be able to write a plain template that does this. Instead, I think I'd go with converting the input Markdown somehow.

I've found github.com/n0x1m/hugoext, but it just runs over your content as an external tool.

I see people talking about Pandoc Lua filters, do these only run externally too?

#hugo
Als Antwort auf scy

Right now, my impression of #Hugo is "it's pretty nice _if_ it contains exactly everything you need, but if it doesn't, you basically have to resort to ugly hacks because it doesn't provide any way of integrating external tools".

Like, you can't even write plugins for this thing if you were to write them in Go, let alone call other binaries.

And all due to some ominous "security".

Dude I trust my content authors (it's me) and template authors (also me), let me call a scriiiiiipt

#hugo
Als Antwort auf scy

My existing website content goes back more than 20 years. I hope to write on the web (or whatever follows it) for another 40.

Selecting a tool for building my website is a big deal, as I'll be writing content _for that tool_ for years, possibly for decades¹.

If that tool doesn't integrate well with whatever shenanigans I'm up to, it's of no use to me.

¹ Which is also why I'm mainly looking into SSGs written in Go or Rust. I want to be able to keep a binary around that still works in 20 years.

Als Antwort auf scy

I get where you’re coming from and I also appreciate hugo being a static binary that I can just keep using for years.

But, I think for the 5 to 10 year horizon, it makes more sense to think about the *data format* compared to *the implementation*.

As in: I choose to blog in markdown, because I know there will be tooling for that in 10+ years still.

Maybe I’ll need to update my configs, or templates, or whatever, but I’ll be able to keep my *content*

Als Antwort auf Michael Stapelberg 🐧🐹😺

@zekjur Oh, sure, the content is more important.

But then again, the content isn't completely independent of the SSG. Directory structure, front matter, shortcodes, that's all contributing to a certain level of vendor lock-in. And Markdown has dialects, too.

Sure, you can write sophisticated shell scripts to convert your content to your new SSG in a few years, but that can be a large piece of work. (It's something that still awaits me for my old blog content 😔)