Skip to content

Commit

Permalink
Defining defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jun 6, 2017
1 parent 4e4b11d commit 0fe0eb6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions nikola/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ POSTS_SECTIONS = True
# {'en': 'private', 'de': 'Privat'},
# {'en': 'business', 'fr': 'Arbeit'},
# ]
# POST_SECTION_TRANSLATIONS = []
# POSTS_SECTION_TRANSLATIONS = []

# If set to True, a section in a language will be treated as a translation
# of the literally same section in all other languages. Enable this if you
# do not translate sections, for example.
# POST_SECTION_TRANSLATIONS_ADD_DEFAULTS = False
# POSTS_SECTION_TRANSLATIONS_ADD_DEFAULTS = True

# Paths for different autogenerated bits. These are combined with the
# translation paths.
Expand Down Expand Up @@ -380,7 +380,7 @@ HIDDEN_TAGS = ['mathjax']
# If set to True, a tag in a language will be treated as a translation
# of the literally same tag in all other languages. Enable this if you
# do not translate tags, for example.
# TAG_TRANSLATIONS_ADD_DEFAULTS = False
# TAG_TRANSLATIONS_ADD_DEFAULTS = True

# Final locations are:
# output / TRANSLATION[lang] / CATEGORY_PATH / index.html (list of categories)
Expand Down Expand Up @@ -446,7 +446,7 @@ HIDDEN_CATEGORIES = []
# If set to True, a category in a language will be treated as a translation
# of the literally same category in all other languages. Enable this if you
# do not translate categories, for example.
# CATEGORY_TRANSLATIONS_ADD_DEFAULTS = False
# CATEGORY_TRANSLATIONS_ADD_DEFAULTS = True

# If ENABLE_AUTHOR_PAGES is set to True and there is more than one
# author, author pages are generated.
Expand Down
6 changes: 6 additions & 0 deletions nikola/nikola.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ def __init__(self, **config):
'CATEGORY_PREFIX': 'cat_',
'CATEGORY_ALLOW_HIERARCHIES': False,
'CATEGORY_OUTPUT_FLAT_HIERARCHY': False,
'CATEGORY_TRANSLATIONS': [],
'CATEGORY_TRANSLATIONS_ADD_DEFAULTS': False,
'CODE_COLOR_SCHEME': 'default',
'COMMENT_SYSTEM': 'disqus',
'COMMENTS_IN_GALLERIES': False,
Expand Down Expand Up @@ -560,6 +562,8 @@ def __init__(self, **config):
'POSTS_SECTION_FROM_META': False,
'POSTS_SECTION_NAME': "",
'POSTS_SECTION_TITLE': "{name}",
'POSTS_SECTION_TRANSLATIONS': [],
'POSTS_SECTION_TRANSLATIONS_ADD_DEFAULTS': False,
'PRESERVE_EXIF_DATA': False,
# TODO: change in v8
'PAGES': (("stories/*.txt", "stories", "story.tmpl"),),
Expand Down Expand Up @@ -597,6 +601,8 @@ def __init__(self, **config):
'TAG_PAGES_ARE_INDEXES': False,
'TAG_PAGES_DESCRIPTIONS': {},
'TAG_PAGES_TITLES': {},
'TAG_TRANSLATIONS': [],
'TAG_TRANSLATIONS_ADD_DEFAULTS': False,
'TAGS_INDEX_PATH': '',
'TAGLIST_MINIMUM_POSTS': 1,
'TEMPLATE_FILTERS': {},
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def postprocess_posts_per_classification(self, posts_per_section_per_language, f
continue
sections.add(section)
self.enable_for_lang[lang] = (len(sections) > 1)
self.translation_manager.read_from_config(self.site, 'POST_SECTION', posts_per_section_per_language, False)
self.translation_manager.read_from_config(self.site, 'POSTS_SECTION', posts_per_section_per_language, False)

def should_generate_classification_page(self, dirname, post_list, lang):
"""Only generates list of posts for classification if this function returns True."""
Expand Down

0 comments on commit 0fe0eb6

Please sign in to comment.