Hi,
I am migrating from Hugo.
Despite the fact I created in the content
folder a _index.md
for every section, I still have orphan pages:
$ find . -name _index.md
./content/posts/_index.md
./content/notes/_index.md
./content/bookmarks/_index.md
./content/_index.md
Zola is explicit about it:
Creating 2634 pages (2632 orphan) and 3 sections
These orphan pages render pretty well by the way
What am I doing wrong? How could I debug this to understand what is happening?
I run zola 0.16.1.
Thanks
keats
February 17, 2023, 4:00pm
2
Where are the pages located on disk? Can you show a tree
of a small folder if you have one?
Yes!
$ tree -L 1 content/notes/
content/notes/
├── 2009
├── 2010
├── 2011
├── 2012
├── 2013
├── 2014
├── 2015
├── 2016
├── 2017
├── 2018
├── 2019
├── 2020
├── 2021
├── 2022
└── _index.md
$ tree content/notes/2022 # edited output
content/notes/2022
├── 01
│ ├── 03
│ │ └── pour-debuter-cette-nouvelle
│ │ └── index.md
│ ├── 20
│ │ └── de-la-curiosite-nait-l
│ │ └── index.md
│ └── 26
│ ├── congratulations-and-many-thanks
│ │ └── index.md
│ └── plus-je-lis-mon-fil-twitter
│ └── index.md
keats
February 18, 2023, 6:23am
4
So you need a _index.md in every subdirectory as well. In your case it can probably just contains:
+++
transparent = true
+++
to pass the pages to the top level section (like content/notes/_index.md
). _index.md
only affects the current directory.
oh! It is a show stopper for me and zola then I have many many folders and sub-folders.
There is no other options to discover all .md
files?
keats
February 20, 2023, 11:50am
6
Nothing right now.
In your case, I would have a single notes
folder with a _index.md
in it.
Then I would have files named 2022-01-03_pour-debuter-cette-nouvelle
for example, where zola would extract the date from the filename. You will still need to set the page in the front-matter of each page though, like:
+++
path = "notes/2022/01/03/pour-debuter-cette-nouvelle"
+++