hugo-apero / hugo-apero

Apéro is a Hugo theme for personal websites. A Hugo theme you'll want to hang out with :milky_way: . This is the source for the theme files to install.
https://hugo-apero.netlify.app/
Creative Commons Attribution 4.0 International
176 stars 53 forks source link

Remove Talks from mainSection field in "About" #74

Closed simonschoe closed 2 years ago

simonschoe commented 2 years ago

Hi there, first of all thank you so much for the amazing theme, it really is lovely! I recently made the switch from Hugo Academic.

Now to my question: I repurposed the talk folder (i.e., list layout) in content for research/publications. However, I'd like to remove the talk folder entirely to not have some of the exemplary talk templates appear on my "About" page (as specified under mainSections in the config.toml): https://simonschoelzel.rbind.io/about/

However, the moment I remove the last of the exemplary talks that ship with the theme (https://github.com/simonschoe/website/tree/master/content/talk, seedling folder), I obtain the following error message when serving the site:

Error: Error building site: failed to render pages: render of "section" failed: "C:\...\website\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

So, I am wondering: How could I remove the exemplary talk and ensure that it is not being shown in my "About" section? On a similar tangent: Is there a way to not show the "Time" field for a talk?

Best, Simon

simonschoe commented 2 years ago

EDIT: I solved this by now. In case anyone encounters the same issue at some point in the future, it was due to a single line in the YAML header of the repurporsed talk section:

---
author: xyz
type: talk   ## << deleting this one solved the issue
cascade:
  type: talk
  show_author_byline: true
  show_comments: false
  show_post_date: true
  show_post_time: false
description: Description
layout: list
show_author_byline: true
show_button_links: true
show_post_date: true
show_post_thumbnail: true
show_post_time: false
title: Research
---