-
I followed https://github.com/adityatelange/hugo-PaperMod/wiki/Features#other-posts-suggestion-below-a-post to enable the "prev/next" post CTAs below a post. Enabling worked straight away but I could not find out how to configure the "order". I want the order to be chronologically, so when I view a post from July 1st 2023, the "next" button would point to the next post in the future by date. Without any additional setting, this order is reversed, so my latest post only has a "next" button, pointing to the nearest post in the past (by date). How do I change that? the latest post should only have the "prev" button, while the oldest post only has the next button. Edit: I missed: #629 just to clearify: I am not asking to chose what is "prev" and "next", I was wondering if the theme provides a config to inverse the behaviour. it might be a nice idea for the theme to add an option like "reverseOrder = true" for showPostNavlinks? The hugo documentation also mentions the "Reverse" option https://gohugo.io/methods/pages/next/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For others coming along, you can overwrite the theme's partial to reverse the order: Create the file Copy paste the html for the nav from the theme with one small change in the first line (the Reverse): |
Beta Was this translation helpful? Give feedback.
For others coming along, you can overwrite the theme's partial to reverse the order:
Create the file
layouts/partials/post_nav_links.html
Copy paste the html for the nav from the theme with one small change in the first line (the Reverse):
{{- $pages := where site.RegularPages.Reverse "Type" "in" site.Params.mainSections }}