I wrote a small filter to replace fixed place-holders with user-defined strings. The filter is configured using the REPLACE_RULES variable in conf.py.
Personally, I use it so simply transform smilies into a Font Awesome icon. It's just way nicer to split design and content by just using :-) in the actual text-files which is than transformed in something more beautiful like a smiley image.
To keep it simple I used a dict as configuration. The key is the place-holder used in the content files and the value describes the string which is than visible in the output:
I wrote a small filter to replace fixed place-holders with user-defined strings. The filter is configured using the
REPLACE_RULES
variable in conf.py.Personally, I use it so simply transform smilies into a Font Awesome icon. It's just way nicer to split design and content by just using
:-)
in the actual text-files which is than transformed in something more beautiful like a smiley image.To keep it simple I used a dict as configuration. The key is the place-holder used in the content files and the value describes the string which is than visible in the output:
I hope there are more people which find this useful...