Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Drop THEME_REVEAL_CONFIG_* settings (#2485)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
- Loading branch information
Showing
with
12 additions
and
15 deletions.
-
+2
−0
CHANGES.txt
-
+2
−2
docs/template-variables.rst
-
+0
−9
nikola/conf.py.in
-
+8
−4
nikola/nikola.py
|
@@ -13,6 +13,8 @@ Math support changes |
|
|
Features |
|
|
-------- |
|
|
|
|
|
* Get rid of ``THEME_REVEAL_CONFIG_*`` settings, use global context |
|
|
instead (Issue #2485) |
|
|
* Add a list of template variables to documentation (Issues #2328, |
|
|
#2712, #2259) and update the theming reference (Issue #2259) |
|
|
* Add ``{post_title}`` tag for Read More links (Issue #2709) |
|
|
|
@@ -99,11 +99,9 @@ Name Type Descript |
|
|
``SLUG_TAG_PATH`` bool ``SLUG_TAG_PATH`` setting |
|
|
``social_buttons_code`` TranslatableSetting<str> ``SOCIAL_BUTTONS_CODE`` setting |
|
|
``sort_posts`` function ``utils.sort_posts`` function |
|
|
``subtheme`` str ``THEME_REVEAL_CONFIG_SUBTHEME`` setting |
|
|
``template_hooks`` dict<str, TemplateHookRegistry> Template hooks registered by plugins |
|
|
``theme_color`` str ``THEME_COLOR`` setting |
|
|
``timezone`` tzinfo Timezone object (represents the configured timezone) |
|
|
``transition`` str ``THEME_REVEAL_CONFIG_TRANSITION`` setting |
|
|
``translations`` dict<str, str> ``TRANSLATIONS`` setting |
|
|
``twitter_card`` dict ``TWITTER_CARD`` setting, defaults to an empty dictionary |
|
|
``url_replacer`` function ``Nikola.url_replacer`` function |
|
@@ -113,6 +111,8 @@ Name Type Descript |
|
|
``use_cdn`` bool ``USE_CDN`` setting |
|
|
``use_katex`` bool ``USE_KATEX`` setting |
|
|
``use_open_graph`` bool ``USE_OPEN_GRAPH`` setting, defaults to True |
|
|
``subtheme`` str? ``THEME_REVEAL_CONFIG_SUBTHEME`` setting (only if set — deprecated) |
|
|
``transition`` str? ``THEME_REVEAL_CONFIG_TRANSITION`` setting (only if set — deprecated) |
|
|
================================== ================================== ================================================================================ |
|
|
|
|
|
Per-page local variables |
|
|
|
@@ -777,15 +777,6 @@ IMAGE_FOLDERS = {'images': 'images'} |
|
|
# This list MAY be incomplete since pygments adds styles every now and then. |
|
|
# CODE_COLOR_SCHEME = 'default' |
|
|
|
|
|
# If you use 'site-reveal' theme you can select several subthemes |
|
|
# THEME_REVEAL_CONFIG_SUBTHEME = 'sky' |
|
|
# You can also use: beige/serif/simple/night/default |
|
|
|
|
|
# Again, if you use 'site-reveal' theme you can select several transitions |
|
|
# between the slides |
|
|
# THEME_REVEAL_CONFIG_TRANSITION = 'cube' |
|
|
# You can also use: page/concave/linear/none/default |
|
|
|
|
|
# FAVICONS contains (name, file, size) tuples. |
|
|
# Used to create favicon link like this: |
|
|
# <link rel="name" href="file" sizes="size"/> |
|
|
|
@@ -595,8 +595,6 @@ def __init__(self, **config): |
|
|
'TEMPLATE_FILTERS': {}, |
|
|
'THEME': 'bootstrap3', |
|
|
'THEME_COLOR': '#5670d4', # light "corporate blue" |
|
|
'THEME_REVEAL_CONFIG_SUBTHEME': 'sky', |
|
|
'THEME_REVEAL_CONFIG_TRANSITION': 'cube', |
|
|
'THUMBNAIL_SIZE': 180, |
|
|
'UNSLUGIFY_TITLES': False, # WARNING: conf.py.in overrides this with True for backwards compatibility |
|
|
'URL_TYPE': 'rel_path', |
|
@@ -946,6 +944,14 @@ def __init__(self, **config): |
|
|
utils.LOGGER.warn('The POSTS_SECTION_ARE_INDEXES option is deprecated, use POSTS_SECTIONS_ARE_INDEXES instead.') |
|
|
self.config['POSTS_SECTIONS_ARE_INDEXES'] = config['POSTS_SECTION_ARE_INDEXES'] |
|
|
|
|
|
# TODO: remove in v8, or earlier |
|
|
if ('THEME_REVEAL_CONFIG_SUBTHEME' in config or 'THEME_REVEAL_CONFIG_TRANSITION' in config or |
|
|
(self.config['THEME'] in ('reveal', 'reveal-jinja') and |
|
|
('subtheme' not in config.GLOBAL_CONTEXT or 'transition' not in config.GLOBAL_CONTEXT))): |
|
|
utils.LOGGER.warn('The THEME_REVEAL_CONFIG_* settings are deprecated. Use `subtheme` and `transition` in GLOBAL_CONTEXT instead.') |
|
|
self._GLOBAL_CONTEXT['subtheme'] = config.get('THEME_REVEAL_CONFIG_SUBTHEME', 'sky') |
|
|
self._GLOBAL_CONTEXT['transition'] = config.get('THEME_REVEAL_CONFIG_TRANSITION', 'cube') |
|
|
|
|
|
# Configure filters |
|
|
for actions in self.config['FILTERS'].values(): |
|
|
for i, f in enumerate(actions): |
|
@@ -1230,8 +1236,6 @@ def _set_global_context_from_config(self): |
|
|
'MATHJAX_CONFIG') |
|
|
self._GLOBAL_CONTEXT['use_katex'] = self.config.get('USE_KATEX') |
|
|
self._GLOBAL_CONTEXT['katex_auto_render'] = self.config.get('KATEX_AUTO_RENDER') |
|
|
self._GLOBAL_CONTEXT['subtheme'] = self.config.get('THEME_REVEAL_CONFIG_SUBTHEME') |
|
|
self._GLOBAL_CONTEXT['transition'] = self.config.get('THEME_REVEAL_CONFIG_TRANSITION') |
|
|
self._GLOBAL_CONTEXT['content_footer'] = self.config.get( |
|
|
'CONTENT_FOOTER') |
|
|
self._GLOBAL_CONTEXT['generate_atom'] = self.config.get('GENERATE_ATOM') |
|
|