Markdown Extensions
I just wanted to give a quick tip that can extend your Markdown syntax and if you’re using django-markup, a highly customizable text markup to HTML project by Martin Mahner, it is dead easy.
I’m using Python-Markdown for formatting in this blog. To enable some of the official extensions all you have to do is to override filter settings for Markdown and let django-markup handle the appropriate function call for you.
Here is an example setting I use in this blog. In your settings.py define:
MARKUP_SETTINGS = {
'markdown': {
'extensions': ['abbr', 'footnotes', 'toc'],
}
}
Then you can enjoy footnotes by using [^1] like this1.
And give them descriptions somewhere in the document:
[^1]: Decription goes here.
And use abbreviations with,
[*SOMEABBR]: definition.
SOMEABBR must be included somewhere in your text.
Finally, if you have some headings in your document, generating a TOC is as easy as:
[TOC]
-
Awesome footnote.↩