hugo-apero / hugo-apero-docs

Apéro is a Hugo theme for personal websites. This is the documentation site, made with the theme :lemon:
https://hugo-apero-docs.netlify.app/
Creative Commons Attribution 4.0 International
85 stars 47 forks source link

fix instructions for renaming and adding sections #99

Closed jmbuhr closed 3 years ago

jmbuhr commented 3 years ago

Cascading the type down to individual pages is not enough, the section / listing page needs to receive the type as well :)

jmbuhr commented 3 years ago

hm, there must be more to it. When I follow the instructions in the manual https://hugo-apero-docs.netlify.app/start/section-config/#level-3-rename-your-folder, for example by cloning this repo and renaming the content/talk folder to content/teaching and adding type: talk to cascade (and optionally to the root yaml as well), I get:

Error: Error building site: failed to render pages: render of "section" failed: "/home/jannik/Desktop/hugo-apero-docs/themes/hugo-apero/layouts/talk/list.html:10:21": execute of template failed: template: talk/list.html:10:21: executing "main" at <.Paginate>: error calling Paginate: cannot convert type page.PagesGroup to Pages
jmbuhr commented 3 years ago

Found it! In this line: https://github.com/hugo-apero/hugo-apero/blob/2480931473ec6380e32be850d7becb932d736b45/layouts/talk/list.html#L10 .Section should be "talk". I will submit a PR once I have a decent internet connection :)

apreshill commented 3 years ago

Thank you!

apreshill commented 3 years ago

@jmbuhr are these doc changes still relevant in your opinion?

jmbuhr commented 3 years ago

Yes, the listing page looks different if the type is only applied to pages in / below the section and not to the actual section _index.md, otherwise the 3rd option is not equivalent to the first 2.

apreshill commented 3 years ago

thank you!