I know Hugo at its core is a static site generator, however sometimes it’s useful to get content from remote resources. This is partially available using the getCSV
/ getJSON
functions, however I think it would be useful to have something more generic, so I propose a getText
function, working in the same way, just without the format parsing.
Technologically, I can’t see this being too difficult, especially as it could likely be reused in the existing functions. {{ jsonify (getText "https://example.com") }}
should thus be equal to {{ getJSON "https://example.com }}"
Opening this because my Go skills arent high enough to implement this myself, and also further discussion, as this is likely a controversial issue, from what i’ve seen from the rest of the discussion base: