4 ms·
That particular example could theoretically be replicated with rendering the content to HTML via .RenderString (https://gohugo.io/functions/renderstring/ https:
by minimaxir 6y ago
That particular example could theoretically be replicated with rendering the content to HTML via .RenderString (https://gohugo.io/functions/renderstring/ https://gohugo.io/functions/renderstring/) + replaceRE (https://gohugo.io/functions/replacere/ https://gohugo.io/functions/replacere/) + an ugly regex, with a layout override to call that modified filter instead of the normal content.
Not 100% sure if that would work, but on paper business logic LOC would be about the same and using a regex is the more canonical way to handle this sort of processing anyways.
- edoceo 6y ago> using a regex is the more canonical way Yuck. I also ran into similar issue with Hugo, where I'm out of the happy-path. Those short codes didn't work, complex processing of some unique bits of content was easier in Jekyll (but also other script-lang based tools) than it was in tools like Hugo.
- nickjj 6y ago> with a layout override to call that modified filter instead of the normal content Would it apply to all content in a specific layout or only specific bits of a certain layout? With the way I have it set up with Jekyll, only a specific post gets the audioseek timestamps added to it, because I wouldn't want it to apply to all lists on the site. I also happen to share a single layout for both podcasts and interviews and interview lists shouldn't get processed with audioseek'd timestamps. With Jekyll this is super easy to pull off because it's only a custom filter. It can be applied to the specific content I want without having to worry about layouts.