Skip to content

shellen/hitchens-eleventy

Repository files navigation

Hitchens for Eleventy

An Eleventy port of Pat Dryburgh's beautifully crafted Hitchens theme.

Hitchens Preview

Deploy to Netlify

View Demo →

About This Port

I found Pat Dryburgh's Hitchens theme years ago and wanted to adapt it for users of Eleventy. This port maintains visual parity with Pat's original design while adapting it to work with Eleventy 3.0's modern tooling.

This port includes:

  • Eleventy 3.0 for static site generation
  • Nunjucks templating
  • Choice of Tailwind CSS or Dart Sass for styling
  • Pat's original EB Garamond typography choices
  • The same minimalist DuckDuckGo search integration

All credit for the design goes to Pat. Any bugs in the port are mine.

Quick Start

  1. Clone this repository
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm start
  4. Visit http://localhost:8080 in your browser

Building for Production

npm run build

This will compile your CSS and generate your static site in the _site directory.

Usage

Site Configuration

Edit _data/site.json to configure your site:

{
  "title": "Your Site Title",
  "description": "Your site description",
  "url": "https://yoursite.com",
  "baseurl": ""
}

Choosing Your CSS Framework

This theme supports both Tailwind CSS (default) and SCSS. You can choose which to use by setting the css_framework option in _data/site.json:

{
  "css_framework": "tailwind"
}

Valid options are "tailwind" or "scss".

The build process will automatically compile the appropriate CSS based on your choice:

  • Tailwind: Compiles assets/css/tailwind.css using Tailwind's utility classes
  • SCSS: Compiles assets/css/main.scss using Dart Sass

Watching for CSS Changes During Development

If you want to watch for CSS changes while developing:

# For Tailwind
npm run watch:css:tailwind

# For SCSS
npm run watch:css:scss

Navigation

The navigation menu is configured in _data/menu.json:

[
  {
    "title": "About",
    "url": "/about/"
  },
  {
    "title": "Source",
    "url": "https://github.com/yourusername/yourrepo"
  }
]

Writing Posts

Create markdown files in the _posts directory with the following front matter:

---
layout: post.njk
title: "Your Post Title"
date: 2025-01-01
---

Your content here...

Posts are automatically sorted by date in reverse chronological order.

Pagination

Pagination is configured in index.html. By default, it shows 3 posts per page. Adjust the size parameter to change this:

pagination:
  data: collections.posts
  size: 3

Hiding Elements

You can hide the search form or credits by setting these in _data/site.json:

{
  "hide_search": true,
  "hide_credits": true
}

Font

The theme includes EB Garamond, designed by Georg Duffner and Octavio Pardo. Pat chose this typeface carefully—it's the closest open-source alternative to the font used on the cover of Hitchens' book Arguably.

A copy of the font license is included in the assets/fonts folder and must be included with any distributions of this theme.

About Christopher Hitchens

Undoubtably one of the great minds of our time, Christopher Hitchens challenged his readers to think deeply on topics of politics, religion, war, and science. This theme's design is inspired by the trade paperback version of his book Arguably, and is dedicated to his memory.

Credits

Original Design & Theme: Pat Dryburgh created the Hitchens Jekyll theme. This is his design, his vision, and his impeccable taste in typography.

Eleventy Port: Jason Shellen ported the theme to Eleventy 3.0, attempting to preserve everything that makes the original special.

Contributing

Bug reports and pull requests are welcome. If you're reporting a design issue, please check whether it exists in Pat's original theme first—the goal of this port is to match his design exactly.

License

This project is licensed under the same MIT License as Pat's original theme.

MIT License

Copyright (c) 2018 Pat Dryburgh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Additional Licenses

EB Garamond Font: Copyright 2017 The EB Garamond Project Authors. Licensed under the SIL Open Font License Version 1.1.

Graphics: Released to the public domain.

About

Eleventy port of the Hitchens Jekyll theme by Pat Dryburgh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •