|Version 12 (modified by 7 years ago) (diff),|
Underscore_Wiki_Page automatic linking
A tiny one-file plugin that transforms the MediaWiki styled
Underscore_Wiki_Page to a link automatically, as it does with
CamelCaseWikiPage. The wiki page name must have at least two words and each word must start with an upper case letter (like
We originally created it to make class names (like Controller_Frontend_Foobar) link to a corresponding wiki page automatically. We do think that CamelCaseStyle is prettier and still use it for most wiki pages :-)
Download the zipped source from [download:underscorewikiplugin here].
This is just a one-file plugin. You can simply put the UnderscoreWiki.py file directly in your plugins directory.
You can download it using wget like that: (make sure its readable by the user running Trac)
wget -O /path/to/trac/env/plugins/UnderscoreWiki.py http://trac-hacks.org/svn/underscorewikiplugin/0.12/UnderscoreWiki.py
This plugin has two configuration options that can be set under a
[underscore-wiki] section in TracIni.
- ignore_missing_pages - Enable/disable highlighting
Underscore_Wiki_Pagelinks to missing pages. Defaults to false (not ignoring them, they'll be shown in grey with a question mark).
- uppercase_in_words - Enable/disable using upper case letters in places other than first character of every word. Only
Foo_Baris supported by default, setting this to true adds support for
FOO_Bar, etc. Defaults to false.
This should look like:
[underscore-wiki] ignore_missing_pages = true uppercase_in_words = false