gitmyhub

jekyll-snippets

★ 540 updated 11y ago

Library of commonly used snippets for Jekyll sites.

A collection of ready-to-use code snippets for Jekyll websites, covering common blog features like post listings, reading time, navigation menus, and feeds so you don't have to build them from scratch.

JekyllHTMLLiquidsetup: easycomplexity 1/5

Jekyll snippets is a collection of reusable code pieces for people building websites with Jekyll, a popular tool for creating blogs and documentation sites. Instead of writing common features from scratch every time you start a new project, you can grab one of these pre-made snippets and drop it into your site.

The library covers the kinds of things most blog or documentation sites need. There are snippets for listing your posts in various ways — by year, by category, with pagination, or showing related posts. You can find one that estimates reading time for an article, builds a navigation menu that highlights the current page, or displays the current year for a copyright footer. There's also a basic Atom feed generator so people can subscribe to your site. Each snippet is a small file with simple HTML and Jekyll's templating code, designed to be copied and adapted to your needs.

This is useful for anyone using Jekyll who wants to save time on the repetitive parts of building a site. If you're a blogger setting up an archive page, a maintainer writing documentation, or someone creating a personal portfolio, these snippets handle the building blocks you'd otherwise piece together yourself. The creator built them from experience — he's used Jekyll for his own blog, Bootstrap's documentation, and a family of themes — so they come from real-world use rather than theoretical examples.

The project is straightforward in its approach: each snippet lives in its own file with a clear name, and the goal is to keep the code as simple as possible. Anyone can contribute by submitting a new snippet or fixing a bug. It's licensed under MIT, meaning you're free to use it in your own projects without restriction.

Where it fits