chiark / gitweb /
plugins: prefix config options by plugin name.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 24 Oct 2017 12:30:44 +0000 (14:30 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 24 Oct 2017 12:30:44 +0000 (14:30 +0200)
So it's clear what is what.

doc/plugins/htmlsanity.rst
doc/plugins/links.rst
pelican-plugins/m/dox.py
pelican-plugins/m/htmlsanity.py
site/pelicanconf.py

index 79314ef11d2b6e4fe2d47d128dbd60133786e1cf..09d142bb3e1a9d3b953abd17d7d9eb42fc439352 100644 (file)
@@ -49,8 +49,8 @@ including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 .. code:: python
 
     PLUGINS += ['m.htmlsanity']
-    HTMLSANITY_SMART_QUOTES = True
-    HTMLSANITY_HYPHENATION = True
+    M_HTMLSANITY_SMART_QUOTES = True
+    M_HTMLSANITY_HYPHENATION = True
 
 `What it does`_
 ===============
@@ -130,7 +130,7 @@ on top. See for yourself:
 
 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::
@@ -200,7 +200,7 @@ that are candidates for a word break:
 
 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::
 
@@ -229,8 +229,8 @@ settings). Just pipe your variable through the ``render_rst`` filter:
     </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::
 
@@ -292,7 +292,7 @@ items), use the ``hyphenate`` filter:
       </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,
index 42dcff2abe9d18ba478f6fde49cef8b1bfbf8b58..5711cb7cdfc5858ef16717a44579f1b9380a6e11 100644 (file)
@@ -137,20 +137,20 @@ including the ``m/`` directory into one of your :py:`PLUGIN_PATHS` and add
 :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.
 
index 7165972b2e7b9992492a4dff532c834230905f8d..ecc9a5ea78a360c12fbad68d31c8338cde2523bd 100644 (file)
@@ -39,7 +39,7 @@ symbol_prefixes = ['']
 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
 
index b6bf9426891dfd2ed193b651d232c618c4d31fb7..77fb7053caf4ac2835897e0b755c51a28abb010c 100644 (file)
@@ -713,8 +713,8 @@ def configure_pelican(pelicanobj):
 
     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']
index d79f2575ef20b71a365ede6f1acb90e735f59b6a..a290b32eea109ef2e04583a9358e47c101bbfbd0 100644 (file)
@@ -126,10 +126,9 @@ CSS_FILES = ['https://fonts.googleapis.com/css?family=Source+Code+Pro:400,400i,6
 
 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 = []