Skip to content
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
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
@@ -13,7 +13,8 @@ Math support changes

* 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
# You can also use: beige/serif/simple/night/default

# Again, if you use 'site-reveal' theme you can select several transitions
# between the slides
# 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):
'THEME': 'bootstrap3',
'THEME_COLOR': '#5670d4', # light "corporate blue"
'UNSLUGIFY_TITLES': False, # WARNING: 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.')

# TODO: remove in v8, or earlier
(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):
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(
self._GLOBAL_CONTEXT['generate_atom'] = self.config.get('GENERATE_ATOM')

0 comments on commit 5246265

Please sign in to comment.