newsroom
newsroom copied to clipboard
Pinned post?
Is it possible to set a pinned post to always show first of all blog posts? Now you sort option based on date, but how can I pin one post on top of other posts?
For future reference and those that might want to go for a similar approach here's what I did:
- Used the
weight
page parameter which is part of Hugo for sorting: https://gohugo.io/variables/page/ and can now order posts anyway I like based on the weight value- Posts I want to show off first get a low weight, while others get pushed back by a higher weight value
- You can use the date to craft a weight value if you want a single post pinned
Not sure if it's too late, but that helped me going for a similar objective, and hope it helps those looking for a quick solution.