PythonCMS - A static blog and site generator


PythonCMS is a static blog and site generator, written in Python 3, which is fully portable and very easy to use.

My idea is to create something that is refreshingly easy and simple to use, requiring only basic knowledge of HTML, yet being very flexible.

PythonCMS blog entry example screenshot

An example post using PythonCMS

Advantages of PythonCMS

  • No config files
  • It fully portable
  • No local webserver required
  • Very easy theming
  • Easy Search Engine Optimization (SEO)
  • AMP & Analytics support

Quickstart guide

It is very easy to get started with PythonCMS.

Installing Python 3

Make sure you have installed Python 3.x (any version 3 will work). If not, download Python 3 here.

Cloning the repository

Clone the PythonCMS repository into the directory of your future site (or blog):

git clone
cd pythonCMS

Alternatively you can download the PythonCMS zip archive here.

Customizing the main page

Edit the index.html file in the root of the directory. This will become the main page of the blog (or site).

I recommend to change the links for the social networks. Feel free to adjust everything to your liking except for the $InsertLatestPostBelow tag. It is required for the script to work.

Writing your first blog post

Your working directory is inside the drafts/drafts folder.

Write your first blog entry in drafts/drafts/draft.html or drafts/drafts/example.html. Again, change it however you want.

For future posts you can create or rename any *.html files inside the drafts/drafts folder. You have full freedom!

Adding media to the blog post

For media (such as images) put them into the media folder (media/) and link 2 levels up from your draft.html:

<img alt="description of your picture" src="../../media/yourpicture.jpg" />

Analytics and SEO

Add any meta, script etc. tags as you would do normally. There are explanatory comments.

Previewing your post

Preview your post by opening the draft.html file you just edited (no local webserver neccessary for preview).

However, it is still good practise to use a simple webserver like:

python -m SimpleHTTPServer

Generating the site

Now it’s time to build the site!



If you have 2 python installations run:


The instructions on screen will guide you through the process.

After that just upload the whole folder to your site (ftp, ssh, whatever). Since PythonCMS is fully portable this is possible without problems.

I even included a robots.txt to exclude the drafts from being indexed by search engines.


Running PythonCMS from Terminal

Running PythonCMS from Terminal


This is the easy part! Basically you can change everything except:

  • $InsertLatestPostBelow (in the root index.html) since it’s required for PythonCMS to generate the menu system (feel free to relocate it)
  • For styling and javascript, make sure draft.html links 2 levels up:

Like this:


That is it!


See for theming, then apply standart theming procedure for this static site generator.

Future release ideas

  • add markdown support
  • backwards compatibility with Python 2


The default theme has been made and published by/at so it’s not by me. Props for them for their amazing work!

Find the source at Ideas for features and contributions are welcome!

F. Liszt b minor sonata analysis

An analysis of the famous b minor Sonata by Franz Liszt.


Using Hugo with Travis CI on GitHub Pages

In this blog post I will show how to build your static website with Hugo and deploy it to GitHub pages automatically using Travis CI. This can have a lot of benefits: For example, you can fix typo's directly from the Github web interface from your phone (without editing raw HTML). I kept the whole setup as minimal as possible. Hence, no bash script or travis command line tools are required.