One of my goals with moving to Jekyll earlier this year was to lower the friction in my blogging process by allowing me to write Markdown in my favorite text editor. Using a static site generator also allows me to write code to simplify my blogging process. One application of this is a template for book reviews, so that I could jot down notes on what I am reading and publish quickly.

Here is an example Markdown file for a book review:

layout: book-review
title: Apollo 13
date: 2016-05-15 07:27:34.000000000 -06:00
type: book-review
categories: []
- space
- Jim Lovell
- Jeffrey Kluger
affiliate_link: ''

Recommended for anyone who has to deal with incident response.

And here is the template that displays all blog posts, starting with the most recent:

<ul class="post-list">
  {% assign sorted_book_reviews = site.book_reviews | sort:"date" | reverse %}
  {% for book_review in sorted_book_reviews %}
      <span class="post-meta">{{ | date: "%b %-d, %Y" }}</span>

      <header class="post-header">
        <a class="post-link" href="{{ book_review.affiliate_link }}" name="{{book_review.title | url_encode }}">{{ book_review.title }}</a>
        {% if book_review.book_authors %}
          <figcaption itemprop="name">by {{ book_review.book_authors | array_to_sentence_string }}</figcaption>
        {% endif %}

      <div class="post-content" itemprop="articleBody">
        {{ book_review.content }}
        {% if book_review.tags %}
          <div class="post-meta">
            {% assign sorted_tags = book_review.tags | sort %}
            <span itemprop="name">Tags: {{ sorted_tags | join:", " }}</span>
        {% endif %}
  {% endfor %}

You can find the results here and keep up with what I have been reading. If you enjoy any of the books listed there feel free to let me know!