highlights icon indicating copy to clipboard operation
highlights copied to clipboard

Minisite for book and article highlights

Highlights

Screenshot of the website

A minisite for book and article highlights: highlights.melanie-richards.com, built with Eleventy. Highlights and covers are copyright to their respective authors. Let’s be book friends

Substantive/breaking changes

Branch rename

The master branch was renamed to main in 2020. Folks who have forked the repo can update their local clones using these instructions.

Migration from Jekyll to Eleventy

The primary purpose of this repo is to deploy highlights.melanie-richards.com, though others may feel free to remix the code for their own highlights sites. As of late 2020, according to my current development practices, this site has been converted from Jekyll to Eleventy. If you'd still prefer to use Jekyll instead, you may access prior releases or branch off of jekyll.

To build

  1. Install Node/npm
  2. Run npm install
  3. Run npx @11ty/eleventy --serve
  4. Visit localhost:8080

To deploy to a subdirectory

I've chosen to deploy my highlights to the root path of a subdomain, but others might prefer a subdirectory (e.g. example.com/highlights/). To do so, change the pathPrefix in .eleventy.js to specify your subdirectory (e.g. /highlights/). You should not need to prepend any permalink frontmatter or URLs referenced in templates with this subpath.

Commands

Command Purpose
npm run start Serve project + watch Sass
netlify build Kick off a Netlify build locally. Useful for local validation w/ Netlify plugins.

Data syntax

Book front-page matter

title: ""
book: dash-separated
author:
kindle: true
spoilers: false
date: YYYY-MM-DD

Where "dash-separated" is also the file name for the _data file, JPG, and SVG.

Each highlight

- text: 
  page: 
  attribution: