{"id":15021016,"url":"https://github.com/ibrado/jekyll-stickyposts","last_synced_at":"2025-10-27T05:31:00.920Z","repository":{"id":56878852,"uuid":"114175625","full_name":"ibrado/jekyll-stickyposts","owner":"ibrado","description":"Jekyll Stickyposts - move selected posts to the top of the list","archived":false,"fork":false,"pushed_at":"2018-02-06T04:49:56.000Z","size":24,"stargazers_count":23,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T02:22:55.101Z","etag":null,"topics":["jekyll","jekyll-plugin","pinned","pinned-posts","priority","priority-posts","sticky","sticky-posts"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibrado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-13T22:31:03.000Z","updated_at":"2024-01-22T12:30:28.000Z","dependencies_parsed_at":"2022-08-20T11:40:42.787Z","dependency_job_id":null,"html_url":"https://github.com/ibrado/jekyll-stickyposts","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-stickyposts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-stickyposts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-stickyposts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibrado%2Fjekyll-stickyposts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibrado","download_url":"https://codeload.github.com/ibrado/jekyll-stickyposts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238437622,"owners_count":19472449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jekyll","jekyll-plugin","pinned","pinned-posts","priority","priority-posts","sticky","sticky-posts"],"created_at":"2024-09-24T19:56:01.357Z","updated_at":"2025-10-27T05:30:55.595Z","avatar_url":"https://github.com/ibrado.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jekyll::StickyPosts\n\n[![Gem Version](https://badge.fury.io/rb/jekyll-stickyposts.svg)](https://badge.fury.io/rb/jekyll-stickyposts)\n\n*StickyPosts* is a plugin for [Jekyll](https://jekyllrb.com/) that sticks/pins posts marked `sticky: true` to the top, i.e. it moves them  before all others. Optionally, the posts could also appear where they normally would.\n\n## Why do this?\n\n1. You want to keep important announcements, etc. at the top of your home page\n1. You want descriptive entries to appear at the top of your collections\n\n## What's new?\n\n*v1.2.2* Allow inclusion in `_config.yml` plugins\n\n*v1.2.1* Fix sorting\n\n*v1.2.0* Add `reverse_sticky` option\n\n*v1.1.0* Support multiple collections\n\n## Installation\n\nAdd the gem to your application's Gemfile:\n\n```ruby\ngroup :jekyll_plugins do\n  # other plugins here\n  gem 'jekyll-stickyposts'\nend\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself:\n\n    $ gem install jekyll-stickyposts\n\n## Configuration\n\nNo configuration is required to run *StickyPosts*. If you want to tweak its behavior, you may set the following options in `_config.yml`:\n\n```yaml\nstickyposts:\n  #enabled: false   # Enable StickyPosts; default: true\n  debug: true       # Show additional info; default: false\n  sort: \"blah\"      # Optional sort field; default: \"date\", use \"none\" to avoid sorting\n  reverse: true     # Ascending order, default: false\n  retain: true      # Also show sticky posts in their original positions; default: false\n  reverse_sticky: true    # Reverse the order of the sticky posts, e.g. oldest first; default: false\n\n  #collection: articles   # The collection to \"stickify\"; default \"posts\"\n\n  # Or multiple collections:\n  #collections:\n  # - posts\n  # - articles\n\n  # Same thing:\n  #collections: [\"posts\", \"articles\"]\n\n```\n\n\u003e Note: if you set `sort` to `\"none\"` and don't sort as described in the next section, Jekyll will re-sort the documents by date. This will likely move the sticky posts out of position.\n\n## Usage\n\nJust add a `sticky: true` entry to your front matter:\n\n```yaml\n---\ntitle: Test\ndate: 2017-12-15 22:33:44\nsticky: true\n---\n```\n\nIf you're not using a paginator at all, use something like:\n\n```html\n{% assign sorted = site.posts | sort: \"stickiness\" %}\n{% for post in sorted %}\n...etc...\n{% endfor %}\n```\n\nIf you're using the original jekyll-paginate:\n\n```html\n{% assign sorted = paginator.posts | sort: \"stickiness\" %}\n{% for post in sorted %}\n...etc...\n{% endfor %}\n```\n\nIf you're using a paginator that allows sorting on fields, e.g. [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2/), you need to edit your `_config.yml` a bit:\n\n```yaml\npagination:\n  # ...\n  sort_field: \"stickiness\"\n  sort_reverse: false\n  # ...\n\n# ...etc...\n\nstickyposts:\n  sort: \"date\"   # or your original pagination sort_field\n  #reverse: true  #  ditto for the sort_reverse\n  # ...etc...\n```\n\nNo changes will be required in your pagination setup:\n\n```html\n{% for post in paginator.posts %}\n...etc...\n{% endfor %}\n```\n## Miscellany\n\nYou may want to mark sticky posts with e.g. a pin from [FontAwesome](http://fontawesome.io/):\n\n```html\n{% if post.sticky %}\n  \u003cspan class=\"sticky\"\u003e\u003ci class=\"fa fa-thumb-tack\" aria-hidden=\"true\"\u003e\u003c/i\u003e\u003c/span\u003e\n{% endif %}\n```\n\nOr, if you want to put a header/descriptive post at the top of your collections:\n\n```html\n{% if post.sticky %}\n  # Formatting for the header\n{% else %}\n  # Formatting for normal entries\n{% endif %}\n```\n\nOr similarly:\n\n```html\n{% unless post.sticky %}\n  # Meta information for the entry\n{% endunless %}\n  # The rest of the entry description, e.g. excerpt\n```\n\n## Demo\n\nSee the [author's blog](https://ibrado.org/) for a (possible) demo.\n\n## Contributing\n\n1. Fork this project: [https://github.com/ibrado/jekyll-stickyposts/fork](https://github.com/ibrado/jekyll-stickyposts/fork)\n1. Clone it (`git clone git://github.com/your_user_name/jekyll-stickyposts.git`)\n1. `cd jekyll-stickyposts`\n1. Create a new branch (e.g. `git checkout -b my-bug-fix`)\n1. Make your changes\n1. Commit your changes (`git commit -m \"Bug fix\"`)\n1. Build it (`gem build jekyll-stickyposts.gemspec`)\n1. Install and test it (`gem install ./jekyll-stickyposts-*.gem`)\n1. Repeat from step 5 as necessary\n1. Push the branch (`git push -u origin my-bug-fix`)\n1. Create a Pull Request, making sure to select the proper branch, e.g. `my-bug-fix` (via https://github.com/*your_user_name*/jekyll-stickyposts)\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/ibrado/jekyll-stickyposts](https://github.com/ibrado/jekyll-stickyposts). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\nEveryone interacting in the Jekyll::StickyPosts project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-stickyposts/blob/master/CODE_OF_CONDUCT.md).\n\n## Also by the author\n\n[Jekyll Tweetsert Plugin](https://github.com/ibrado/jekyll-tweetsert) - Turn tweets into Jekyll posts. Multiple timelines, filters, hashtags, automatic category/tags, and more!\n\n[Jekyll::Paginate::Content](https://github.com/ibrado/jekyll-tweetsert) - Split your Jekyll pages, posts, etc. into multiple pages automatically. Single-page view, pager, SEO support, self-adjusting links, multipage-aware Table Of Contents.\n\n[Jekyll::ViewSource](https://github.com/ibrado/jekyll-viewsource) - Generate pretty or plain HTML and/or Markdown source code pages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrado%2Fjekyll-stickyposts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibrado%2Fjekyll-stickyposts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrado%2Fjekyll-stickyposts/lists"}