Create _index.md inside each folder and sub-folders
bhutiyakishan1 opened this issue · comments
Hi there,
I dont know if its an issue or not,it might be a simple question to you but i have been trying to figure out since a day !
I am using your theme and i have a lot of folders and subfolders,now i came to realize that in order to show the content on webpage,you need to have _index.md inside every folder...and i literally have more than 100 folders!
Is there a way to solve it without having to create _index.md for every folder?
Thanks!
You can rename one of the existing files in each folder to _index.md. Just choose the file you want to be the “landing” page for each folder. The tradeoff is that you’ll lose the automatically-generated Content section list.
As far as I know, you need the title in the frontmatter - that's what will appear in the menu.
If you want to see a demo of the Content section list, see: https://aventurine.netlify.com/.
The repo is here: https://github.com/eyoder/aventurine
(apologies - just updated the site to have the test/_index.md files)
Apologies - I just broke it...I'll have to pick this up later.
Hi,
Sounds like the issues is not really in the theme itself. The content structure is a requirement by design from the Hugo.
You could use some scripting language/shell/PS/cmd to copy those files, even as pre-processing before build, if that's the case.