Good evening everyone,
I’m using v. 0.62.0, and I’m trying to understand how to generate a page from a data file (JSON, TOML, whatever). I don’t want to generate multiple pages from a single data file (as asked here); I just want to be able to print the data inside that single page.
As I understand, it should be possible because in the Page Bundles page it says the index file name’s extension of a Leaf Bundle can be json
or any other valid MIME type. If I create an index.md
containing just the front matter, the html page is generated. If I, however, rename the index.md
as index.json
, Hugo does not generate the page, nor output any error.
An acceptable workaround would be having an index.md
file and a separate data file that gets loaded by the page template. However, I didn’t find a way to load a data file that’s not stored inside the data
folder. I’d prefer to keep data files inside the Leaf Bundle folder.
Am I missing something?