jekyll-snippets icon indicating copy to clipboard operation
jekyll-snippets copied to clipboard

Library of commonly used snippets for Jekyll sites.

Jekyll snippets

I'm a big fan of Jekyll. I've built my blog on it, as well as Bootstrap's documentation and a family of themes. This repository serves as a library of commonly used Jekyll snippets.

Contents

Posts

  • List of posts for archive or condensed index pages.
  • List of posts by year for archive pages.
  • Series of full posts with titles, links, and post body content.
  • Related posts based on time.
  • List of posts in a category.
  • Paginated posts with <span>s, <a>s, classes, and more.
  • Link to next post.
  • Reading time

Pages

  • Navigation with active class for linking pages with the layout: page.

Layout

  • Page title with site title fallback
  • Page additional styles for style exceptions in individual pages.

Data

  • List of items from a particular .yml file in the _data directory.

Time

  • Current year for things like copyright.
  • Current date as full month, day, and year.

Feeds

  • Basic Atom feed generator

Contributing

Have a suggestion or bug fix? Open a pull request or issue. I'd be happy to have more snippets here. Update the list above and include the snippet with a clear file name and the simplest HTML possible.

License

Licensed under MIT.