Pelican is a static site generator. It works by compiling a folder of Markdown, ReStructured Text, or HTML files into a website — with a theme and plugins to customise the result.
You create a new website with pelican-quickstart. This will ask some questions and create the initial files and folders.
Writing a Post
Posts are just files created in the
content folder. You can write posts in
Markdown, ReStructured Text, or HTML. ReStructured Text is my format of choice as its also used in sphinx.
Pelican will make various meta data in your post available to the themes templates. Most themes will make use of the following:
- the publication date of the document
- the last modification date of the document
- a comma separated list of tags, used to generate tag pages
- the category of the post, used to generate category pages
- the name of the documents author
- a summary of the document used in the description
.. content/my-awesome-blog-post.rst My Awesome Blog Post #################### :date: 2015-11-16 17:56:12 :modified: 2015-11-16 17:56:44 :tags: awesome, blog, posts :category: amazing :author: Daniel Knell :summary: The most awesome thing ever. Content goes here.
To test your site with the built in server, run make serve and open http://localhost:8000/ in your browser.
Once you’re happy with the result, you can generate a folder to upload with make publish or push to github pages with make github.