Sphinx is really a Python library to create nice documentation from some Relaxation formatted text files.

I question if anyone has written Sphinx plug ins to really make it generate personal websites and blogs.

Specifically for blogs, there should be a method to instantly list posts chronologically and produce a Feed. One should write a Sphinx wordpress plugin to complete such special page/xml generation.

Has anybody attempted this before?

Doug hellmann, author from the 'Python Module from the Week' does his site using Sphinx.

http://world wide web.doughellmann.com/PyMOTW/

He's several posts that go over sphinx subjects that may most likely help for your way:


I have tried it at http://reinout.vanrees.org/website . The important thing trick would be to do give a preprocessor step. I have experienced my blog records inside a website/yyyy/mm/dd/ folder structure.

A script iterates using that folder structure, creating index.txt files in each and every directory, listing the subitems. The standard sphinx process then renders individuals index.txt files.

I added a custom sphinx processor for tags. So ".. tags:: python, buildout" somewhere towards the top of my website entry creates the tags. And also the preprocessor again collects individuals records and creates out a website/tags/TAGNAME.txt file which sphinx again renders normally.

The preprocessor also produces the main website/index.txt using the latest 10 records. As well as an website/atom.xml in (hardcoded) the output directory for that feed.

So: you'll need some custom stuff, but it's virtually plain text, so for me personally it had been a pleasant exercise. And you're able to write some assistant scripts to create existence easy, for example one which copies a textfile from somewhere to present day website directory (including development of missing sites as well as an "svn add").

Not Sphinx, but some of the sites at http://codespeak.internet/ are through with scripts that take Relaxation text, creates HTML and uploads these to the website. I did not write individuals scripts though, but I have used them.

It is a reasonable method to generate sites when the sites have to contain lots of Relaxation files anyway, like when producing documentation for python modules, which obviously these websites are only for. It is also good if you want the website to become version controlled, since you can keep your source code in svn or hg, or something like that.

But when you begin writing lots of automatic menues along with other extensions, what you should finish track of ultimately is really a cms. And there's lots of individuals around already, so you might like to take a look at them first.

Another example may be the new packages.python.org. There you will get your documentation in anyway you would like it, after which through PyPI upload a zip-file using the paperwork. Distribute has been doing this with Sphinx: http://packages.python.org/distribute . But there no particular script is required, that's just producing HTML from Sphinx documentation.


I have to admit which i find the thought of writing a blogging software as Sphinx extension a little funny, especially since there's a lot excellent blogging software available already. And absolutely nothing will beat Wordpress anyway, and wordpress.com is a great blogging experience for me personally. But being an exercise in what you can abuse Sphinx, why don't you! :-)