James Gardner: Home > Blog > 2007 > Using reStructuredText with Wordpress

Using reStructuredText with Wordpress

Posted:2007-09-01 14:59
Tags:Python

Wordpress is great but almost everything I write is in rst format for use on the Pylons wiki, in documentation etc. Luckily there is a way to use reStrucutredText in Wordpress too but it requires a bit of configuring.

Download the latest version from http://goldenspud.com/rest-wordpress/ (a backup 1.2 is here) and put it in your wp-content/plugins/ directory as rest.php.

I'm on Ubuntu 6.06 so I install docutils like this:

apt-get install python-docutils

I then just change the $prefix to /usr and change $rst2html to $prefix/bin/rst2html.py.

Activate the plugin from the "Plugins" tab in the WordPress admin area making sure no other markup plugins are enabled and that you've unticked " WordPress should correct invalidly nested XHTML automatically" in the writing options section.

To use rst just start the post with .. -*- mode: rst -*-.

Other links:

(view source)

James Gardner: Home > Blog > 2007 > Using reStructuredText with Wordpress