Pelican Notes

Quick start guide

http://docs.getpelican.com/en/stable/quickstart.html

Run a local test server

/usr/local/bin/pelican --listen

Access locally: http://localhost:8000/index.html

Run a local server with make

make devserver

Access locally: http://localhost:8000/index.html

Validate that web page builds

make html

Validate that it builds with publish configuration

make publish

Recreate website with specific theme

/usr/local/bin/pelican -t pelican-blue

Install a new theme

pelican-themes --install pelican-blue --verbose

Delete existing theme

pelican-themes --delete pelican-blue --verbose

Initial website setup

pelican-quickstart

Markdown front matter format

Title:
Date: 2010-12-03 10:20
Category:
Tags:
Status:
Slug:
Authors:
Summary:

Metadata keys

You can also have your own metadata keys (so long as they don’t conflict with reserved metadata keywords) for use in your python templates. The following is the list of reserved metadata keywords:

Title
Tags
Date
Modified
Status
Category
Author
Authors
Slug
Summary
Template
Save_as
Url

Pages

If you create a folder named pages inside the content folder, all the files in it will be used to generate static pages, such as About or Contact pages. (See example filesystem layout below.)

You can use the DISPLAY_PAGES_ON_MENU setting to control whether all those pages are displayed in the primary navigation menu. (Default is True.)

If you want to exclude any pages from being linked to or listed in the menu then add a status: hidden attribute to its metadata. This is useful for things like making error pages that fit the generated theme of your site.

Static content

Static files are files other than articles and pages that are copied to the output folder as-is, without processing. You can control which static files are copied over with the STATIC_PATHS setting of the project’s pelicanconf.py file.

Pelican’s default configuration includes the images directory for this, but others must be added manually.

In addition, static files that are explicitly linked to are included (see below).

Other interesting Pelican blogs

https://matthewdevaney.com/


Published

Category

Cheatsheets

Tags

Contact