Is it possible to dynamically create a page for data in the data file?
As in for every element in an array in my datafile, I want a unique .html file for it without writing multiple md files.
Is it possible to dynamically create a page for data in the data file?
As in for every element in an array in my datafile, I want a unique .html file for it without writing multiple md files.
Currently no.
I think this would be a great addition to get an author page (āpost byā pages)
This would be a nice feature, or something that can give control to generate more pages. My case is that I want multiple galleries under different sections, but donāt want to have to repeat code by creating something like a list in layouts per section.
Any update on this? I have a very practical case: I want to build a site that has a page for every city/town in the United States (yikes!), about 30,000 pages or so. Iāve converted a SQL table to JSON and contains things like cityName, state, ID, population, long, lat, etc.
Using that data, Iād like to tell Hugo to build pages off of each item in the (giant) array. The end result would be a well manicured subtree of states, and city-pages within each state subfolder.
Sounds easy, right!?
Nothing has changed on this. Your best approach right now is to generate content files for each city based on the data. Use the content front matter to store your custom fields.
It would be a great Hugo feature, if we can create multiple HTML pages from single json file in data directory. Kindly update here is anyone is aware how to do it. Thanks a lot in advance
Please follow the latest development on https://github.com/gohugoio/hugo/issues/5074 āBuild pages from data sourceā
The ālatest developmentā on that issue is much like watching paint dry ā¦ Boring as hell, but I guess cool when we get there ā¦