Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time

The Astrochelys Pelican Theme

This is the theme we use for OutOfCheeseError

Basic Usage

  1. Start a blog using Pelican
  2. Clone this repository alongside your
  3. Add the following options to (the table of contents can be customized as desribed here)
THEME = "./astrochelys"
PLUGINS = ['pelican-toc']
DIRECT_TEMPLATES = (('index', 'tags', 'categories', 'archives'))


Margin notes and Side notes

Add margin and side notes to your articles by including raw HTML (which can be done in markdown, Jupyter notebook, and org-mode formats at least)

<label for="mn-note" class="margin-toggle">&raquo;</label>
<input type="checkbox" id="mn-note" class="margin-toggle"/>
<span class="marginnote">
your note here

and for a numbered side-note:

<label for="sn-note" class="margin-toggle sidenote-number"></label>
<input type="checkbox" id="sn-note" class="margin-toggle"/>
<span class="sidenote">
your note here

Change mn-note and sn-note to different names for each additional note (both in the label and the id)


Astrochelys supports both Google and Fathom analytics.

  • To use Google Analytics, set the GOOGLE_ANALYTICS variable in to your Analytics ID.
  • To use Fathom, set the FATHOM_SITE_ID variable to the site ID given by Fathom, and the FATHOM_ANALYTICS variable to the server address performing the tracking (We use Fathom Lite hosted on Heroku for this, following the instructions here.)


Astrochelys provides comments using either Hypothesis or Disqus (or both). Disqus support is controlled by the variable DISQUS_SITENAME in Hypothesis is embedded in the header and appears on the right side of the page.


Astrochelys supports search via tinysearch and some JS code taken from Matthias Endler’s blog source. To set this up:

  • Install tinysearch and terser as described in the tinysearch repository
  • Add a file in your_pelican_directory/content/pages with
Title: JSON
Template: json
Slug: json
  • Set the ADD_SEARCH_BOX variable to True in
  • Finally, add the following to your pelican Makefile:
.PHONY: index
index: content ## Build the search index with tinysearch
        tinysearch --optimize --path $(OUTPUTDIR) $(OUTPUTDIR)/pages/json.html
.PHONY: minify
minify: ## Compress JavaScript assets
        terser --compress --mangle --output $(OUTPUTDIR)/search_min.js -- $(OUTPUTDIR)/tinysearch_engine.js

.PHONY: build
build: html index minify ## Build static site and search index, minify JS

and, instead of running pelican content to build your output files, run make build instead.

Colors & Fonts

  • All website colors and fonts are defined in the first few lines of static/css/astrochelys.css, change these for a different theme. The modified fonts need to be downloaded from Google Fonts in the Fonts section of the <head> in static/templates/base.html
  • Syntax highlighting colors are defined in static/css/pygments.css. Change this to any pygments theme you like. If your syntax theme needs a non-white background, add background: <color> to the pre, pre code section in astrochelys.css. You can then probably remove the border since the color already demarcates the code block.
  • Change the sidebar color by changing the background variable in the .sidebar section of astrochelys.css.


Every line of code in excruciating detail over at this post.


A Pelican theme with a sidebar, margin notes, search, and colors based on code highlighting