Book reviews for your Jekyll site, built for Minima 📚
The purpose of this project is to provide Jekyll users with a simple, hackable book reviews template.
It consists in two HTML layouts:
_layouts/books.html
displays a list of book reviews beloning to a custom Jekyll collection_layouts/review.html
displays an individual book review with the book's cover, either self-hosted or imported through the Open Library Covers APIIt was developed for Minima (the Jekyll default theme) and can be set up on a site running Minima in minutes, but it can also be easily adapted to any theme.
There's also a greater long-term vision for this project. I'll write about it soon and create a roadmap. Star/watch this repo to stay up to date!
Okay, here's the demo (on an out-of-the-box Jekyll site running Minima).
The books list:
An individual book review:
Requirements: a functional Jekyll site.
Summary (for the Minima theme)
books
collectionbooks.html
and review.html
layouts to your _layout
directorybooks
layoutreview
layoutbooks
collectionTo get started with custom collections, you need to set them up in your Jekyll configuration file.
First, copy this code into your _config.yml
file in your Jekyll root directory:
# Collections
collections:
books:
output: true
permalink: /:collection/:title/
What it does:
books
Then, create a folder named _books
in your Jekyll root directory. This is where you'll write your book reviews!
For more information about collections, see Jekyll's amazing docs.
books.html
and review.html
layouts to your _layouts
directoryThis step is pretty straightforward.
Copy the _layouts
folder at the root of this repo into your Jekyll root directory.
If you have an existing _layouts
folder in your Jekyll root, simply add in there the two template files, books.html
and review.html
.
books
layoutCopy books.md
to your root Jekyll directory.
The front matter:
layout: books
in the front matter - this will display your books listlist_title: My reviews
in the front matter to override the default "Latest reviews"title: Books
and a permalink with permalink: /books/
The contents:
review
layoutYou're all set up!
Writing a book review works much like writing a post.
Optionally, copy the book review template
to your new /_books
folder.
The front matter:
layout: review
in the front matterdate: YYYY-MM-DD HH:MM:SS
(this will display as the date you've read the book)title: A Great Book
author: My Favourite Writer
year: 2018
/assets/covers
and specify your image's file name in front matter with cover: "2018-01-01-book-cover.jpg"
olid: OL7243520M
or the book's ISBN with for example isbn: 9780156439619
(warning: some ISBNs do not yet have a listing on the Open Library and won't return a cover image)A few additional notes about book covers:
cover:
, olid:
or isbn:
.cover:
, if not look for an Open Library ID, if not look for an ISBN, and if not will not display any cover imageThe contents: