Pelican pages not showing?

I spent a bit of time playing with Pelican. Pelican is a static site generator written in Python, similar to Ruby's hugely popular Jekyll.

The Problem

One thing that isn't particularly well documented is that if you create a sample project, your articles (blog posts) will be picked up in the static site generation process from the content directory without any further configuration, but your pages in the content/pages directory won't get detected, and hence won't appear.

Of course, the first thing to do is to check the pelican settings and look for settings related to pages.. and when you do so, you find PAGE_DIR defaults to pages.

The key to the solution is in the description of PAGE_DIR, which is Directory to look at for pages, relative to PATH.

What's the default PATH? None. Right, that could be a problem.

The Fix

I had assumed that PATH was already be set to content because some of the articles that I had created were showing up, but it doesn't appear to be set in the settings file. Let's try setting it.

PATH = "content"

Voila, it works! Pages are now shown.

My guess is that even though Pelican is clever enough to default your content directory to content, it doesn't seem to do it by setting PATH.