pyMarkdown Minisite

What this script does

This script simply parses a folder with markdown files to html files with an index file containing a list of all files.

More exactly: It parses those files in the passed folder whoose filename ends with .mdwn to html into a subfolder named "static" using the html templates from the "templates" folder.

Also it adds a date footer showing when the file last changed.

For example this scripts main website was created from this readme file. If you're reading this on the web, then you're already on the main website and might be more interested in seeing the markdown code from which this file was parsed :)


The example style.css has been taken from

All parsing of files is done using pyMarkdown.

If you like the script, why don't you have a look at its website or its code? (the one of them you aren't reading right now :) )


The script requires pyMarkdown to be installed in such a way that can be called directly from the command line.

Also it requires a templates directory to be present in the project to be converted:


Example files are given, so you can just copy the templates folder into your projects folder.


To use it, just call it with the name of your project, the dir to parse and a main site url.


Options: --help - get help --force-update - reparse all sites and update all date tags.


Using this script along with Mercurial for simpler static website management

Together with Mercurial hooks this script can be used to manage simple static sites with extremely low effort - if you're on a system with a shell and lftp (commandline ftp client) and naturally Mercurial.

To do so, just add the following hooks to your .hg/hgrc file inside your projects directory (which must be version controlled by Mercurial).



outgoing.parse = "YOUR WEBSITES NAME" . http://YOUR_WEBSITES.URL


It will then compile every markdown file (*.mdwn) in the top level folder of your project (project/) to html files, put those into the subfolder "static" (project/static/) and then upload the subfolder "static" to the folder on your ftp server which you passed as "RELATIVE_PATH_ON_YOUR_FTP_SERVER".

pyMarkdown Minisite

-- 2013-08-06 23:37:43 --

Created with pyMarkdown Minisite
using the layout from the pybrary.