You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
set recent_posts_number = 0
observe recent posts are still being shown
The bigger picture (we need context)
Hugo Config
The text was updated successfully, but these errors were encountered:
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?
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.
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
recent_posts_number = 0
The bigger picture (we need context)
Hugo Config
The text was updated successfully, but these errors were encountered: