So it's clear what is what.
.. code:: python
PLUGINS += ['m.htmlsanity']
- HTMLSANITY_SMART_QUOTES = True
- HTMLSANITY_HYPHENATION = True
+ M_HTMLSANITY_SMART_QUOTES = True
+ M_HTMLSANITY_HYPHENATION = True
`What it does`_
===============
The default language is of course taken from the standard :py:`DEFAULT_LANG`
option, which defaults to :py:`'en'`. This feature is controlled by the
-:py:`HTMLSANITY_SMART_QUOTES` option, which, similarly to the builtin
+:py:`M_HTMLSANITY_SMART_QUOTES` option, which, similarly to the builtin
:py:`TYPOGRIFY` option, defaults to :py:`False`.
.. note-warning::
Thanks to Unicode magic this is either hidden or converted to a real hyphen and
*doesn't* break search or SEO. This feature is controlled by the
-:py:`HTMLSANITY_HYPHENATION` option, which also defaults to :py:`False`.
+:py:`M_HTMLSANITY_HYPHENATION` option, which also defaults to :py:`False`.
.. note-success::
</html>
The filter is fully equivalent to the builtin reST rendering and the above
-:py:`HTMLSANITY_SMART_QUOTES` and :py:`HTMLSANITY_HYPHENATION` options affect
-it as well.
+:py:`M_HTMLSANITY_SMART_QUOTES` and :py:`M_HTMLSANITY_HYPHENATION` options
+affect it as well.
.. note-warning::
</ul>
</nav>
-The hyphenation is by default controlled by the :py:`HTMLSANITY_HYPHENATION`
+The hyphenation is by default controlled by the :py:`M_HTMLSANITY_HYPHENATION`
option. If you want to control this separately, pass a boolean variable or
simply :py:`True` to the filter ``enable`` argument. The language is by default
taken from the standard :py:`DEFAULT_LANG` option, if you want to override it,
:py:`m.dox` package to your plugins in ``pelicanconf.py``. The plugin uses
Doxygen tag files to get a list of linkable symbols and you need to provide
list of 3-tuples containing tag file path, URL prefix and list of implicitly
-prepended namespaces in :py:`DOXYGEN_TAGFILES` configuration to make the plugin
+prepended namespaces in :py:`M_DOX_TAGFILES` configuration to make the plugin
work. Example configuration:
.. code:: python
PLUGINS += ['m.dox']
- DOXYGEN_TAGFILES = [
+ M_DOX_TAGFILES = [
('doxygen/corrade.tag', 'http://doc.magnum.graphics/corrade/', ['Corrade::']),
('doxygen/magnum.tag', 'http://doc.magnum.graphics/magnum/', ['Magnum::'])]
Use the :rst:`:dox:` interpreted text role for linking to documented symbols.
All link targets understood by Doxygen's ``@ref`` or ``@link`` commands are
understood by this plugin as well. In order to save you some typing, the
-leading namespace(s) mentioned in the :py:`DOXYGEN_TAGFILES` setting can be
+leading namespace(s) mentioned in the :py:`M_DOX_TAGFILES` setting can be
omitted when linking to given symbol. If a symbol can't be found, a warning is
printed to output and the link text is rendered in monospace font.
def init(pelicanobj):
global symbol_mapping, symbol_prefixes
- tagfiles = pelicanobj.settings.get('DOXYGEN_TAGFILES', [])
+ tagfiles = pelicanobj.settings.get('M_DOX_TAGFILES', [])
# Pre-round to populate subclasses
global enable_hyphenation, smart_quotes, hyphenation_lang, \
docutils_settings, intrasite_link_regex
- enable_hyphenation = pelicanobj.settings.get('HTMLSANITY_HYPHENATION', False)
- smart_quotes = pelicanobj.settings.get('HTMLSANITY_SMART_QUOTES', False)
+ enable_hyphenation = pelicanobj.settings.get('M_HTMLSANITY_HYPHENATION', False)
+ smart_quotes = pelicanobj.settings.get('M_HTMLSANITY_SMART_QUOTES', False)
hyphenation_lang = pelicanobj.settings['DEFAULT_LANG']
docutils_settings = pelicanobj.settings['DOCUTILS_SETTINGS']
intrasite_link_regex = pelicanobj.settings['INTRASITE_LINK_REGEX']
FORMATTED_FIELDS = ['summary', 'landing']
-HTMLSANITY_SMART_QUOTES = True
-HTMLSANITY_HYPHENATION = True
-
-DOXYGEN_TAGFILES = [
+M_HTMLSANITY_SMART_QUOTES = True
+M_HTMLSANITY_HYPHENATION = True
+M_DOX_TAGFILES = [
('../doc/doxygen/corrade.tag', 'http://doc.magnum.graphics/corrade/', ['Corrade::'])]
DIRECT_TEMPLATES = []