Hosting a Pelican blog on Github (1st post)

This blog was created with the help of:

  • Gandi, to register the domain name. Gandi in my experience are excellent. Zero spam, no upselling of unnecessary packages, and great community support. Plus, as far as I know, the staff aren't elephant hunters.
  • Pelican, a simple python framework for creating static websites. Lacks the pizzazz of frameworks like Django, but that's okay (/good).
  • Monospace theme for Pelican. Might change later, but I like the simple look for now.
  • Github, for hosting the site. Offers free hosting for a single website, which is nice.
  • Disqus, to allow comments. Initially I'd wanted to avoid relying on an external service for comments, but the simplicity of Disqus was difficult to argue with. They have nice customer service too, as it turns out.

The rough process was:

  1. Create a personal site on Github.
  2. Register a domain with Gandi. Point domain to Github via the zone file. The settings will take a few hours to propogate.
  3. Clone Pelican into a local folder, on a branch named 'source'
  4. Add the theme files to the source branch.
  5. Add personal settings to the pelicanconf.py and publishconf.py files.
  6. Add a favicon.ico and CNAME file to the source folder.
  7. Modify the 'github' command in the Makefile to push to a personal site, rather than project site. Also add line to the 'publish' command to copy the favicon and CNAME files.
  8. Add blog posts to the content folder.
  9. Run 'make github', which compiles the site on the 'master' branch and pushes to Github.
  10. For an overview of the file structure, see the source and master branches on Github.

So now, to add a new blog post, I create a markdown file to the content folder (on the source branch) and run 'make github'. Easy!

Comments