Is it possible to use "sort of dynamic" pages using hugo?

433 views Asked by At

I need sort of "dynamic" pages generated during build

/id/1
/id/2
/id/3
/id/4

How to create a dynamic route?

content/
--| id/
-----| _id.html
--| index.html
1

There are 1 answers

0
Mr. Hugo On

This looks like the request to generate pages based on a data file. This is a long awaited (missing) feature in Hugo, see https://github.com/gohugoio/hugo/issues/5074. It has been an issue for almost 10 years now (see https://github.com/gohugoio/hugo/issues/140#issuecomment-67767381).

Not a strange request and you are clearly not alone. But unfortunately the answer is 'no'. You should use one of the workarounds in the github discussions. Waiting on this has become pointless.