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

Pinned post? #29

Open
davisaqueen opened this issue Apr 29, 2021 · 1 comment
Open

Pinned post? #29

davisaqueen opened this issue Apr 29, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@davisaqueen
Copy link

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?

@onweru onweru self-assigned this Apr 29, 2021
@onweru onweru added the enhancement New feature or request label Apr 29, 2021
@osV22
Copy link

osV22 commented Jun 26, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants