Restructured Text Moin Moin
A set of tweaks to Moin Moin to accomplish the following:
- make Restructured Text the default markup
- make pygments work on code blocks
- default pygments to python highlighting
- use codemirror as an RST editor
This is based off of Moin 1.9.3.
To just get RST as the default and have Pygments highlighting be automatic
copy text_rst.py to MoinMoin/parser/text_rst.py
copy pygments.css to MoinMoin/web/static/htdocs
edit your wikiconfig.py and add the following:
default_markup = 'rst' stylesheets = [('screen', '/moin_static193/pygments.css')]
You should now be able to add code blocks that are by default Python highlighted using the syntax:
.. sourcecode: def foo(bar): print "hello world"
To also get syntax highlighting via CodeMirror
- copy PageEditor.py to MoinMoin/PageEditor.py
- download and unzip CodeMirror (I used .8) from http://marijn.haverbeke.nl/codemirror/
- copy the /js and /css directories out of CodeMirror to MoinMoin/web/static/htdocs/js and MoinMoin/web/static/htdocs/css respectively
- copy parserst.js to MoinMoin/web/static/htdocs/js
- copy rstcolors.css to MoinMoin/web/static/htdocs/css
You should now have a fancy code editor with syntax highlighting too.
Enjoy your Sphinx like wiki.