remove boilerplate 'recent' overview #19

Merged
jsheunis merged 2 commits from config-recent into main 2026-04-22 12:24:03 +00:00
3 changed files with 9 additions and 3 deletions

View file

@ -9,8 +9,8 @@ copyright = "© 2025 Psychoinformatics group"
[params]
dateFormat = "2 January 2006"
mainSections = ["samples"]
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
mainSections = ["posts", "projects"]

I think this should be an array of strings, ie. only single brackets would work: ["posts", "projects"].

I think this should be an array of strings, ie. only single brackets would work: `["posts", "projects"]`.

ah damn, thanks for catching that! I've force-pushed a fix for this, though I'm unsure whether that is actually needed given your explanation about the taxonomy pages

ah damn, thanks for catching that! I've force-pushed a fix for this, though I'm unsure whether that is actually needed given your explanation about the taxonomy pages

Thanks - this was needed because the "recent" section would not show any pages regardless of other reasons. With the fix it still doesn't show any pages, now because of the term vs regular page, but that can be solved by copying the recent-articles partial from the theme and changing the where expression.

Thanks - this was needed because the "recent" section would not show any pages regardless of other reasons. With the fix it still doesn't show any pages, now because of the term vs regular page, but that can be solved by copying the recent-articles partial from the theme and changing the `where` expression.

thanks - I've done this in 7da390d7c7. At its current state, this looks like this:

image

Visually, I don't find it as nice as the regular sites (with a summary, image, and date tag)

image

I tried a while whether I could make images and summaries appear for term pages (e.g., I listed persons under 'recent', which at least have an image), but it certainly does not work out of the box, and I failed to tweak the layout enough with my weak partial-foo to bend it into shape.

image

After this brief exploration, I would echo your earlier remark whether it is even worth keeping the recent section at all. I would now argue against it, and if you agree, I'll simply disable it.

thanks - I've done this in 7da390d7c753dfc4100a88ec836e292a426defce. At its current state, this looks like this: ![image](/attachments/287e941f-713e-47ac-b9f4-17b059673928) Visually, I don't find it as nice as the regular sites (with a summary, image, and date tag) ![image](/attachments/f2fc2e3f-4990-428d-9dd8-7417bd66f90d) I tried a while whether I could make images and summaries appear for term pages (e.g., I listed persons under 'recent', which at least have an image), but it certainly does not work out of the box, and I failed to tweak the layout enough with my weak partial-foo to bend it into shape. ![image](/attachments/332b3ba4-6494-4785-b348-fac69ee348ac) After this brief exploration, I would echo your earlier remark whether it is even worth keeping the recent section at all. I would now argue against it, and if you agree, I'll simply disable it.

Thanks for the visual samples!

I agree that we won't get it for free out of the box - we would need to customize a cascade of partials starting with article-link (by cascade I mean that one and some of those it includes). Which we might end up doing anyway at some point, because the same partial is used in other pages to show what we might call related content.

I had a look around the theme's partials; people's portraits don't show because the theme's article-link partial looks for *thumb* in page resources while we use "portrait"; the cloud of labels are all terms shown by article-meta partial (ie. theme's default taxonomy-related behavior); dates would probably show if we had them in those pages; summary is controlled by the showSummary param which can be set site-wide (we have it at false) or set for each page (taking precedence, we're currently not setting it). I'm not sure what exactly is used for the summary, not all of our pages have a nice text content at the beginning.

This goes to say: we could, if we wanted to, customize this to look "nice", and I could even see myself working on it. I know our current approach is to show changes once done rather than discuss them upfront, but without full confidence I wanted to outline the possible approach rather than implement it.

As far as the PR goes, I'm still not sure about the recent section, but it can be refined so if you decide to keep it I won't block it.

Thanks for the visual samples! I agree that we won't get it for free out of the box - we would need to customize a cascade of partials starting with article-link (by cascade I mean that one and some of those it includes). Which we might end up doing anyway at some point, because the same partial is used in other pages to show what we might call related content. I had a look around the theme's partials; people's portraits don't show because the theme's article-link partial looks for `*thumb*` in page resources while we use "portrait"; the cloud of labels are all terms shown by article-meta partial (ie. theme's default taxonomy-related behavior); dates would probably show if we had them in those pages; summary is controlled by the `showSummary` param which can be set site-wide (we have it at false) or set for each page (taking precedence, we're currently not setting it). I'm not sure what exactly is used for the summary, not all of our pages have a nice text content at the beginning. This goes to say: we could, if we wanted to, customize this to look "nice", and I could even see myself working on it. I know our current approach is to show changes once done rather than discuss them upfront, but without full confidence I wanted to outline the possible approach rather than implement it. As far as the PR goes, I'm still not sure about the recent section, but it can be refined so if you decide to keep it I won't block it.
description = "Research in this lab focuses on the interface of computer and information sciences, neuroscience, and psychology."
[params.author]
name = "Congo"

View file

@ -32,7 +32,7 @@ fingerprintAlgorithm = "sha256"
[homepage]
layout = "custom" # valid options: page, profile, custom
showRecent = true
showRecent = false
recentLimit = 5
[article]

View file

@ -0,0 +1,6 @@
{{ if .Site.Params.homepage.showRecent | default false }}
<h2 class="mt-8 text-2xl font-extrabold">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
{{ range first .Site.Params.homepage.recentLimit (.Paginate (where .Site.Pages "Type" "in" .Site.Params.mainSections) .Site.Params.homepage.recentLimit).Pages }}
{{ partial "article-link.html" . }}
{{ end }}
{{ end }}