Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

python-webgen is a Python version of the well known webgen static website generator. It is not a complete rewrite of webgen and some features are missing but there are also a few new nice things. The main reason exists is because i did not know ruby and changing things with webgen is a pain so i decided to use my own python generator.


  • Quick generation of multilingual (, static websites.
  • Compatibility with webgen site architecture (.page format).
  • Clean and easy site architecture (one .page file == one html file)
  • More readable configuration file (no more yaml).
  • Jinja2 templates for generation (selectable per page, templating in page).
  • Provides a coarse blog post handler (posts can be printed through template loops, no tags yet)
  • All properties set in the .page header can be used in the template
  • Modular plugin system
  • Easy python plugin in subfolder (no system installation needed)


  • Links list configurable in the config file.
  • Language menu.
  • Website sitemap.xml automatically generated.
  • Automatic reference page generation from bibtex file.
  • Print list from csv file.
  • Zorglangue page generation (from french).

Markdown plugins:

  • Can be used (when listed in config file) from subfolder mdextensions.
  • Can use latex formulas with 'latex' extension but requires latex and dvipng

Less desirable features:

  • Only Markdown markup langage for now (should be easy to change anyway).
  • Does not work out of the box on a webgen site (config file and template have to be adapted)
  • No hierachical menu, all pages in menu have the same level
  • Not extremely tested.


Required python modules

The file is self content but some python modules are required:

  • argparse (>=0.1)
  • configobj (>=4.7)
  • jinja2 (>= 2.6)
  • markdown (>= 2.1)

Those can be easily installed on debian-based linux with:

apt-get install python-argparse python-configobj python-jinja2 python-markdown 


The github repository contains a example website with:

  • website.cfg a demo config file
  • templates folder containing templates for the demo website
  • src source architecture and content for the website

Execute pywebgen in the folder for generating the website in the out folder:

$ .././pywebgen


Right now documentation is nearly non-existent but the website architecture is the same as for webgen. And the python code is not so long yet.