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.
- 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
- Navigation with active class for linking pages with the
layout: page
.
- Page title with site title fallback
- Page additional styles for style exceptions in individual pages.
- List of items from a particular
.yml
file in the_data
directory.
- Current year for things like copyright.
- Current date as full month, day, and year.
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.
Licensed under MIT.