reorx / hugo-PaperModX

A fast, clean, responsive Hugo theme.
https://reorx.github.io/hugo-PaperModX/
MIT License
326 stars 86 forks source link

[BUG] Archives page renders as list page #65

Closed allen-liaoo closed 6 months ago

allen-liaoo commented 6 months ago

Describe the bug An archives layout page sometimes display using list.html rather than archives.html.

Steps to reproduce the behavior: Paste the following lines in both layouts/_default/archives.html and list.html, which will print for an archives page.

{{- warnf "list: %s" .Page.Name -}}

However, it seems like the order in which they print doesn't matter, the archives page will still be treated as a list page. Sometimes it displays as an archives page, but when it does it is always empty.

I was only able to have it display as an archives page by copying archives.html and list.html into my own layouts/_default and override the code in list.html with the contents of archives.html. But then the home page behaves like an archive page.

Expected behavior: A page with layout: archives is displayed with list.html layout.

Additional context I'm using Github submodule

allen-liaoo commented 6 months ago

Nevermind, I realized that my "archives" need to be in contents folder. Would be great if this requirement is removed though