How to output on a page some files which are in a directory?
rocc-o opened this issue · comments
rocc-o commented
I have some .njk files in a directory which I'd like to output on a page - a list of these files
./directory/
index.njk
page1.njk
page2.njk
page3.njk
and I'd like these .njk files have the link to their URLs
How can I do that?
Peter deHaan commented
I think easiest solution is probably add a “directory.json” file which sets a custom tag which will auto create a collection which you can loop over to display urls or front after data.
rocc-o commented
Yes! It works! Thank you!