Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 823
Cem Kaan Avatar asked Jan 25 '26 12:01

Cem Kaan


1 Answers

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.

like image 156
JoostS Avatar answered Jan 29 '26 07:01

JoostS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!