Skip to content

A bare bones example of a Pelican powered blog that can be deployed to a Dokku powered PaaS

License

Notifications You must be signed in to change notification settings

sehrope/pelican-dokku-bare

Repository files navigation

A bare bones example of a Pelican generated static site for a blog that you can easily deploy to a PaaS.

Installation

First install Pelican. For example on Ubuntu you can install it via:

# Install pip
$ sudo apt-get install python-pip

# Install pelican via pip
$ sudo pip install pelican

# Install markdown via pip (we're going to write our posts in Markdown)
$ sudo pip install markdown

Then to set the bare site up locally, clone this repository:

# Clone it locally:
$ git clone --recursive https://github.com/sehrope/pelican-dokku-bare my-blog

# Enter the directory:
$ cd my-blog

Usage

To run the dev server locally (i.e. while you are writing a post):

# Start it up:
$ ./develop_server.sh start

The dev server will keep running until you stop it. Any edits made to your site will be noticed (it polls the filesystem) and the site will be regenerated. To stop the dev server:

# Stop it
$ ./develop_server.sh stop

To deploy it your Dokku powered PaaS:

# Add a git remote for your Dokku server:
$ git add remote production [email protected]:blog

# Push it:
$ git push production master

Features

  • Easy to setup
  • Should "just work" out of the box.
  • Includes custom 403, 404, and 500 error pages.
  • Defaults to using a slightly customized Octopress theme. Changing to a different theme is just a matter of picking one and editing pelicanconf.py. There a lot of themes to choose from.
  • Preconfigured for "git style" deploys to Dokku with a slightly customized pelican build pack (mainly adds additional error pages to the nginx config).

Customization Steps

  1. Edit pelicanconf.py

    1. Change AUTHOR
    2. Change SITE_NAME
    3. Change SITE_SUBTITLE
    4. Change AUTHOR_ABOUT (optional)
    5. Change TIMEZONE (optional)
  2. Edit publishconf.py

    1. Change SITEURL
    2. Set GOOGLE_ANALYTICS (optional)
  3. Edit pages/about.md

  4. Edit pages/contact.md

  5. Add your GPG key to extras/publickey.asc (optional)

  6. Edit content/posts/intro.md

New Posts

Add new posts written in Markdown by creating new ".md" files in the content/posts directory. You can use the intro.md file as an example.

License

Pelican itself is licensed under the AGPL.

The sample site published in this repo is released under the MIT license. See the file LICENSE.

About

A bare bones example of a Pelican powered blog that can be deployed to a Dokku powered PaaS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published