Skip to content
Permalink
Browse files
Added changes and improved warning.
  • Loading branch information
felixfontein committed Apr 28, 2018
1 parent 3e664ac commit 6b297a505256f4b010c29543178824d40d35d607
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
@@ -4,6 +4,9 @@ New in master
Features
--------

* Tags ``draft``, ``private`` and ``mathjax`` are no longer treated
special if ``USE_TAG_METADATA`` is set to ``True`` (default for
new blogs) (Issue #2761)
* Produce a better error message when a template referenced in another
template is missing (Issue #3055)
* Support captioned images and image ordering in galleries (Issue #3017)
@@ -127,6 +130,8 @@ Removed features
Other changes
-------------

* Rename ``is_mathjax`` to ``has_math``. Themes using ``is_mathjax`` must
be updated; it is recommended that they are changed to use ``math_helper.tmpl``.
* Rename ``crumbs.tmpl`` to ``ui_helper.tmpl`` and the breadcrumbs
``bar`` function to ``breadcrumbs``

@@ -270,12 +270,21 @@ def __init__(
'Valid values are "published", "private" and "draft".').format(self.source_path, status))

if self.config['WARN_ABOUT_TAG_METADATA']:
show_warning = False
if 'draft' in [_.lower() for _ in self._tags[lang]]:
LOGGER.warn('The post "{0}" uses the "draft" tag.'.format(self.source_path))
show_warning = True
if 'private' in self._tags[lang]:
LOGGER.warn('The post "{0}" uses the "private" tag.'.format(self.source_path))
show_warning = True
if 'mathjax' in self._tags[lang]:
LOGGER.warn('The post "{0}" uses the "mathjax" tag.'.format(self.source_path))
show_warning = True
if show_warning:
LOGGER.warn('It is suggested that you convert special tags to metadata and set ' +
'USE_TAG_METADATA to False. You can use the XXX command plugin for ' +
'conversion. Change the WARN_ABOUT_TAG_METADATA configuration to ' +
'disable this warning.')
if self.config['USE_TAG_METADATA']:
if 'draft' in [_.lower() for _ in self._tags[lang]]:
is_draft = True

0 comments on commit 6b297a5

Please sign in to comment.