Is it possible to mimic taxonomies with only /data/foo.toml?


I have a simple site constructed only with /data/foo.toml.
It shows videos with all metadata. Those metadata are subject to quick evolution.

It is quite easy to parse the toml and create simili tags, with count, …

But I can’t find a way to show the taxonomy/term when I click on one term.

So, I’d like to mimic the Hugo’s taxonomy behaviour, but I do not have any /content.

I read lot of threads about taxonomies, data, even the Taxonomy terms in data file and others but I can’t find an elegant (or working) solution.

Not sure if i’m cristal clear in my question, but Is it possible to achieve this before we have Pages from data ?

I think it might be possible. But you will need at least one content file so a layout is parsed… if I understand that correct. Have a look how I included data files in the hugonewsletter. That might give you ideas. Once the data is in a variable it’s just parsing over it imho.

The only thing I don’t think is possible is that you create multiple pages from one layout/data file. If I would have to spend time on that problem I would try to create a Vue or React system where nothing is parsed when the page is loaded. Lazy loading and working with JS and the browser history API.

Sounds like an SPA to me.

1 Like

Thanks a lot @davidsneighbour !!

Yes, I wanted multiple pages. So not possible before we can make pages from data.

And I’ve done your solution : parsing the data.yaml and pre-rendering/generating all the “pages/sections/parts” on my main index.html.