Skip to content
Permalink
Browse files

Merge pull request #2723 from getnikola/drop-reveal-theme-settings

Drop THEME_REVEAL_CONFIG_* settings (#2485)
  • Loading branch information
ralsina committed May 12, 2017
2 parents 3d77845 + ae0bffd commit 5246265bca4a04548da5284dfab0816fbc6af0aa
Showing with 12 additions and 16 deletions.
  1. +2 −1 CHANGES.txt
  2. +2 −2 docs/template-variables.rst
  3. +0 −9 nikola/conf.py.in
  4. +8 −4 nikola/nikola.py
@@ -13,7 +13,8 @@ Math support changes
Features
--------


* Get rid of ``THEME_REVEAL_CONFIG_*`` settings, use global context
instead (Issue #2485)
* New emoji shortcode
* Add ``SECTION_PATH`` support to move the section indexes to a
user-defined location (Issue #2738)
@@ -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
@@ -760,15 +760,6 @@ IMAGE_FOLDERS = {'images': 'images'}
# Check with list(pygments.styles.get_all_styles()) in an interpreter.
# 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"/>
@@ -597,8 +597,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',
@@ -949,6 +947,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):
@@ -1233,8 +1239,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')

0 comments on commit 5246265

Please sign in to comment.
You can’t perform that action at this time.