Pelican

raw JSON →
4.12.0 verified Fri May 01 auth: no python

Pelican is a static site generator written in Python. It supports Markdown and reStructuredText content, offers theming via Jinja2 templates, and generates static HTML files suitable for deployment on GitHub Pages, Netlify, etc. Current version is 4.12.0, with releases roughly twice a year.

pip install pelican
error ModuleNotFoundError: No module named 'pelican'
cause Pelican is not installed in the current Python environment.
fix
Run pip install pelican.
error TypeError: 'NoneType' object is not callable
cause Often caused by a misconfigured `PAGE_ORDER_BY` or `ARTICLE_ORDER_BY` setting that references a nonexistent metadata field.
fix
Verify that the order key exists in all your pages/articles or set a default.
error pelican: error: unrecognized arguments: -r -l
cause The `-r` (auto-reload) and `-l` (launch server) flags were merged into `--autoreload` or `-r` in Pelican 4.10+.
fix
Use pelican -r -l still works, but if you see this error, update Pelican. Alternatively use pelican --autoreload --listen.
breaking Pelican dropped support for Python 3.8 in version 4.12.0. Python 3.11 or later is required.
fix Upgrade to Python 3.11+.
deprecated The `pelican-quickstart` script is deprecated and may be removed in a future release. Use `pelican quickstart` subcommand instead.
fix Replace `pelican-quickstart` with `pelican quickstart`.
gotcha Settings are case-sensitive. Common mistake: using `SITEURL` instead of `SITEURL` (correct), but many users misspell it.
fix Check your pelicanconf.py for correct spelling of settings.
gotcha If you upgrade from Pelican < 4.10 to >= 4.10, the default summary generation changed: `SUMMARY_MAX_PARAGRAPHS` now defaults to None (full content), and `SUMMARY_MAX_LENGTH` also changed. Check your summaries.
fix Explicitly set `SUMMARY_MAX_PARAGRAPHS` and `SUMMARY_MAX_LENGTH` in your config if you rely on them.
pip install pelican[markdown]

Basic usage: read settings from a configuration file and run Pelican to generate the site.

from pelican import Pelican
from pelican.settings import read_settings

settings = read_settings('pelicanconf.py')
pelican = Pelican(settings)
pelican.run()

# Or use the command line:
# pelican content -s pelicanconf.py -o output