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?

Latest commit


Git stats


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


Papyrus is a fast and responsive theme built for the Pelican site generator. It is styled using Tailwind CSS. It supports dark mode as well as site search via a plugin.


This theme requires the pelican-search, pelican-neighbors, pelican-readtime, and pelican-toc plugins. The first three plugins can be installed using Pip. Pelican-ToC will be installed manually. We will also need Stork and beautifulsoup4 as dependencies.

$ pip install pelican-search
$ pip install pelican-neighbors
$ pip install pelican-readtime

Create two directories, themes and pelican-plugins, inside the root level of your project. Clone the Papyrus theme inside the themes directory that you created.

$ cd myBlog
$ mkdir themes pelican-plugins
$ git clone themes/papyrus

Now clone the pelican-toc plugin repo (not available via Pip) into your pelican-plugins directory and install beautifulsoup4, which is required by this plugin.

$ git clone pelican-plugins/pelican-toc
$ pip install beautifulsoup4

Papyrus is designed to support search functionality. However, you will still need to have Stork installed on the system that will generate your site. Verify the stork CLI tool is availability on your $PATH by running stork -h, and if not, go ahead and install it.

# Install Stork using Homebrew
$ brew install stork-search/stork-tap/stork

# If you already have the Rust toolchain, you can install Stork with Cargo
$ cargo install stork-search --locked


Following is an example settings file. Please change the values to meet your needs.

AUTHOR = 'Author'
SITENAME = 'Papyrus'
TIMEZONE = 'Australia/Sydney'

SUBTITLE = 'Papyrus'
SUBTEXT = '''A fast and responsive theme built for the
<a href="">Pelican</a> site generator.<br>
The theme is inspired by <a href="">Hugo-PaperMod</a>.
It is styled using <a href="">Tailwind CSS</a>.
It supports dark mode and built in search function.
COPYRIGHT = '©2022'
PATH = 'content'
THEME = 'themes/Papyrus'
PLUGIN_PATHS = ['pelican-plugins']
PLUGINS = ['readtime', 'search', 'neighbors', 'pelican-toc']
    'extra/robots.txt': {'path': 'robots.txt'},
    'images/favicon.ico': {'path': 'favicon.ico'},
DIRECT_TEMPLATES = (('index', 'search', 'tags', 'categories', 'archives',))
PAGINATED_TEMPLATES = {'index': None, 'tag': None, 'category': None, 'author': None, 'archives': 24,}

# Site search plugin
SEARCH_MODE = "output"
# Table of Content Plugin
TOC = {
    'TOC_HEADERS'       : '^h[1-3]', # What headers should be included in
                                     # the generated toc
                                     # Expected format is a regular expression
    'TOC_RUN'           : 'true',    # Default value for toc generation,
                                     # if it does not evaluate
                                     # to 'true' no toc will be generated
    'TOC_INCLUDE_TITLE': 'false',    # If 'true' include title in toc

# Feed generation is usually not desired when developing
FEED_ALL_ATOM = 'feeds/all.atom.xml'

# Social widgets
    ('github', ''),
    ('twitter', ''),

# Article share widgets
    ("twitter", ";url="),
    ("linkedin", ""),
    ("reddit", ""),
    ("facebook", ""),
    ("whatsapp", " - "),
    ("telegram", ";url="),


# Uncomment following line if you want document-relative URLs when developing


Generate Articles

A sample article header follows below. Adding a Summary field is highly recommended. It substitutes as the article description and gets added to the HTML as <meta name="description" content="...">. Summaries are also used on the blog's home page. They help to keep similar height article previews without titles, images, or code blocks.

Title: Installation
Date: 2021-12-14
Tags: CSS, Markdown, Python, AI
Category: Software
Summary: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.

Source content files created inside the directory named pages will have a separate static page and a direct link, such an About page.

You can now run the development server and visit:

cd myBlog
$ pelican --autoreload --listen --ignore-cache

Final project directory structure should look similar to this.

$ (pelican) ➜ myProject tree
├── myBlog
│   ├── content
│   │    ├── extra
│   │    │    └── robots.txt
│   │    ├── images
│   │    │   ├── favicon.ico
│   │    │   └── camera.png
│   │    ├── pages
│   │    │   ├──
│   │    │   └──
│   │    ├── Hardware
│   │    │   ├──
│   │    │   └──
│   │    └── Software
│   │        ├──
│   │        └──
│   ├── Makefile
│   ├── output
│   │
│   ├──
│   ├── pelican-plugins
│   │   └── pelican-toc
│   │
│   ├──
│   ├──
│   └── themes
│       └── Papyrus
└── venv

Image Size and Placement

Images can be placed on the page by adding custom class names such as image-left, image-right, image-center in your Markdown content.

Similarly, placed images can be given a size using custom classes: image-thumbnail, image-small, image-medium, andimage-large

You can use <img/> tags along with the custom image classes straight in your Markdown content.

<img src="{static}/images/screenshot.png" alt="screenshot" class="image-left image-medium" />
<img src="{static}/images/screenshot.png" alt="screenshot" class="image-right image-thumbnail" />

Alternatively you could use inline styling.
<img src="{static}/images/screenshot.png" alt="screenshot" style="width:200px;" />

Embedding YouTube Videos

In order to have a responsive video thumbnail, the <iframe> tags must be wrapped inside the <div class="aspect-w-16 aspect-h-9"></div> in your Markdown content.

<div class="aspect-w-16 aspect-h-9">
    <iframe width="736" height="414" src="" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>

Tailwind CSS

If you would like to make any local theme customizations, Tailwind CSS configuration files are included with the theme. First go into the Papyrus directory and install development packages via: npm install

Then run the development server that watches for your changed Tailwind classes inside the templates folder and updates main.css on the go.

# Initial installation of packages
$ cd themes/papyrus
$ npm install

# JIT compiled main.css
$ npm run dev

Performance and SEO Improvements


The settings file now has placeholders for your robots.txt and favicon.ico files. Please note these files are not included. You must create and add them yourself.

├── content
│    ├── extra
│    │    └── robots.txt
│    ├── images
│    │   ├── favicon.ico
│    │   └── camera.png

If you are updating from an older version of this theme, please be sure to update your with the EXTRA_PATH_METADATA and STATIC_PATHS directives, as seen in the sample settings above.


This project is based on hugo-PaperMod which is a fork of hugo-paper.