Simple site generator.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
example_path @ 5306f9d


Build Status


simpleGen is a simple static website/blog generator that just does what it is supposed to do no more and no less.

The philosophy behind simpleGen

I built simpleGen beceause I needed something dead simple to make my static sites, I could have used something like pelican or jekyll but I think they are bloated so hacking on the code will be some much harder, simpleGen is about 400 lines of python code.

simpleGen does not do things it not intended to do, instead it does just what a sane person wants from a site generator, TO GENERATE THE DAMN MARKDOWN (or whatever markup language you use), simpleGen does not provide solutions to deploy the static content, or providing a development server, that is another problem that I think does not overlap with the basic functioning of a static website generator.

Installing simplegen.

You can install simpleGen from the Python package index using pip (I maintain this package).

$ pip install simplegen

or you could get it from github using (using the https protocol) using

$ pip install git+

you also can install the development version from the development branch using

$ pip install git+

Grab a coffee (or two if you have slow connection).

And then you want to initialize the site config, so use:

$ initsite input_dir output_dir

A config file with name will be generated, edit that with what suits you and your theme you are using or planning to make.

then you can write you content in markdown in the input_dir, then run:

$ makesite

to actually generate your content.

deploying your website is up to you, I myself use git submodules and github pages.

Config options

You can define any option really to use in your template, but these are the ones that simplegen knows.

Option name Type Default Value Description
CONTENT_DIR String "content/" From where to get the input
OUTPUT_DIR String "output/" Where to save the output
PAGINATOR_MAX Int 20 How many articles per page
MINIFY_HTML Boolean False Minify the ouptput HTML
ASSETS_PATH String None The path of the user assets

Making themes

simpleGen uses jinja2 as its templating language so making themes should be fairly easy.

This is the theme I made for my technical blog

and this is my file:

CONTENT_DIR = 'content/'
OUTPUT_DIR = 'output'
DESCRIPTION = 'Mohamed Aziz Knani techincal blog, follow me @moonflock.'
SITE_TITLE = 'Mohamed\'s blog'
	('Home Page', ''),
	('<i class="fa fa-github" aria-hidden="true"></i> Github', ''),
	('<i class="fa fa-google-plus" aria-hidden="true"></i> Google plus', ''),
	('<i class="fa fa-envelope" aria-hidden="true"></i>', '')


Many people like to use the github pages service mainly because it's free and it uses git.

I also do that for my personal website.

So for deploying I have written this shell script:


cd output
git add .
git commit -m "New deploy"
git push origin master
cd ..
cd content
git add .
git commit -m "New version"
git push origin master
cd /home/mohamed/programming/
git pull
cd ..
git add technical-blog
git commit -m "New deploy"
git push origin master

My folder looks like this:

├── content
│   ├──
│   └──
├── output
│   ├── somefile.html
│   ├── someotherfile.html
│   └── index.html

I also version control my markdown files which is also nice.

If you don't like git (or versioning) just write some fabric file to do the deploy for your site.


You can test the code using:

$ mktmpenv
$ git clone --recursive
$ cd simplegen
$ python test

Get in touch

If you like simpleGen and use it for your website, I would be pleased if you let me know, also pull requests are welcome :)


GNU GPLv3 Image

SimpleGen is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.


  • Write tests.
  • Make a paging system.
  • Transform it into a package.
    • Upload it to pypi.
    • Use armin's click.
  • Support Python3.
  • Add tags support.