Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ananke will always show recent posts on index #794

Open
Klaas- opened this issue Nov 17, 2024 · 2 comments · May be fixed by #795
Open

bug: ananke will always show recent posts on index #794

Klaas- opened this issue Nov 17, 2024 · 2 comments · May be fixed by #795
Assignees

Comments

@Klaas-
Copy link

Klaas- commented Nov 17, 2024

This seems to be a regression, either because of the recent ananke changes or because of changes in hugo.
Setting recent_posts_number = 0 will no longer disable showing recent posts on index.

I tested a little and I think this is because {{ $n_posts := $.Param "recent_posts_number" | default 3 }} will default to 3 if recent_posts_number is 0.

Expected Behavior

Ability to disable recent posts on index

Current Behavior

not possible to disable recent posts on index

Possible Solution

Add a parameter to toggle showing recent posts

Steps to Reproduce

  1. set recent_posts_number = 0
  2. observe recent posts are still being shown

The bigger picture (we need context)

Hugo Config

@davidsneighbour
Copy link
Collaborator

I think $.Param got slightly demoted a while back. The last paragraph here is the solution. I would suggest to use the solution offered there instead of hard coding a default into the template?

@davidsneighbour
Copy link
Collaborator

Ignore my comment ;) I did not look at the PR before commenting, and my comment was focused only on the $.Param issue, which is not related to the PR at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants