Skip to content
Permalink
Browse files

Add FRONT_INDEX_HEADER setting

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 17, 2016
1 parent 7638ac8 commit eeed8250ce923b1d8fb2cd02c4f4fafbeb0c171d
Showing with 25 additions and 0 deletions.
  1. +12 −0 CHANGES.txt
  2. +6 −0 nikola/conf.py.in
  3. +3 −0 nikola/data/themes/base/templates/index.tmpl
  4. +4 −0 nikola/nikola.py
@@ -1,3 +1,15 @@
New in v7.7.6
=============

Features
--------

* Add ``FRONT_INDEX_HEADER`` setting to allow adding greeting notices
to the main index page

Bugfixes
--------

New in v7.7.5
=============

@@ -391,6 +391,12 @@ HIDDEN_AUTHORS = ['Guest']
# output / TRANSLATION[lang] / INDEX_PATH / index-*.html
# INDEX_PATH = ""

# Optional HTML that displayed on “main” blog index.html files.
# May be used for a greeting. (translatable)
FRONT_INDEX_HEADER = {
DEFAULT_LANG: ''
}

# Create per-month archives instead of per-year
# CREATE_MONTHLY_ARCHIVE = False
# Create one large archive instead of per-year
@@ -12,6 +12,9 @@

<%block name="content">
<%block name="content_header"></%block>
% if 'main_index' in pagekind:
${front_index_header}
% endif
<div class="postindex">
% for post in posts:
<article class="h-entry post-${post.meta('type')}">
@@ -412,6 +412,7 @@ def __init__(self, **config):
'FILES_FOLDERS': {'files': ''},
'FILTERS': {},
'FORCE_ISO8601': False,
'FRONT_INDEX_HEADER': '',
'GALLERY_FOLDERS': {'galleries': 'galleries'},
'GALLERY_SORT_BY_DATE': True,
'GLOBAL_CONTEXT_FILLER': [],
@@ -554,6 +555,7 @@ def __init__(self, **config):
'BODY_END',
'EXTRA_HEAD_DATA',
'NAVIGATION_LINKS',
'FRONT_INDEX_HEADER',
'INDEX_READ_MORE_LINK',
'FEED_READ_MORE_LINK',
'INDEXES_TITLE',
@@ -587,6 +589,7 @@ def __init__(self, **config):
'posts_section_descriptions',
'posts_section_name',
'posts_section_title',
'front_index_header',
)
# WARNING: navigation_links SHOULD NOT be added to the list above.
# Themes ask for [lang] there and we should provide it.
@@ -954,6 +957,7 @@ def _set_global_context(self):
self._GLOBAL_CONTEXT['show_blog_title'] = self.config.get('SHOW_BLOG_TITLE')
self._GLOBAL_CONTEXT['logo_url'] = self.config.get('LOGO_URL')
self._GLOBAL_CONTEXT['blog_description'] = self.config.get('BLOG_DESCRIPTION')
self._GLOBAL_CONTEXT['front_index_header'] = self.config.get('FRONT_INDEX_HEADER')
self._GLOBAL_CONTEXT['color_hsl_adjust_hex'] = utils.color_hsl_adjust_hex
self._GLOBAL_CONTEXT['colorize_str_from_base_color'] = utils.colorize_str_from_base_color

0 comments on commit eeed825

Please sign in to comment.