cagix / pandoc-lecture

Pandoc Markdown Lecture Template: This project defines a skeleton repo for creating lecture slides and handouts including lecture notes out of Pandoc Markdown (https://pandoc.org/MANUAL.html) using a single source approach.
MIT License
97 stars 18 forks source link

Filter: makedeps enqueues landing pages too late #153

Closed cagix closed 1 year ago

cagix commented 1 year ago

When a file 'a/b/c/foo.md' is loaded and analysed, the landing page 'a/b/c/readme.md' is added to the queue, followed by any links contained in this current file.

In reality, this can result in the intermediate pages 'a/readme.md' and/or 'a/b/readme.md' not being analysed. This leads to these pages being missing from the generated Hugo web page (it will present dummy pages "here could be your content"), and additionally the sequence in the menu gets mixed up.

Furthermore, it is possible that a file in sequence level "A" contains a link to a file in sequence level "D". This could enqueue the landing page of level "D" earlier than those of level "B" and "C", which would confuse the menu ordering.