README.md

SWG - Static Website Generator

What is SWG ?

SWG is a new generation static website generator, featured by the Mako (http://www.makotemplates.org/) template system, born from the need to
have both performances and "WEB 2.0" contents and capabilities.

Given a set of files, one for each page/article, one for each author and one for the categories hyerarchy, SWG will read the configuration file
you specify from command line and generate a complete static website, with tags and categories indexing.

Installation

To get the latest released version:

::

pip install swg

Create a new website

To start a new website, type:

::

swg --create website-folder-name

An example site with a basic structure will be created inside the 'website-folder-name' directory.
Then you can type:

::

cd website-folder-name
swg --serve

To test the website locally.
The first article is about customization and basic configuration, so read it carefully.

Generate your website

Once you are in the directory containing your website definition (with a swg.cfg file in it), just run:

::

swg --generate

To start website generation, other options are available, use

::

swg --help

To a display the complete list.

Importing from another platform

Right now, there's the swg-wordpress script you can use to convert a WordPress XML backup file to the
SWG format, to use it consider the following:

So let's say for instance, that you have your wp.xml file and you want to export it to the 'example-site.com' directory, downloading
images referenced by the articles into the 'example-site.com/images' directory (the import will replace properly image urls), you
will use the command line:

And it's all done!
Now you just have to create the templates, fix the categories hyerarchy inside the file 'example-site.com/db/categories.txt', customize
your own description inside 'example-site.com/db/your-nickname.txt' and make the configuration file following the example below.