Skip to content
Permalink
Browse files

Fix #2699 -- ignore NEW_POST_DATE_PATH for pages

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 24, 2017
1 parent 96c6d1d commit 2f78cd5b2efe78c687cac8927b8cf579042437d4
Showing with 3 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +1 −0 nikola/conf.py.in
  3. +1 −1 nikola/plugins/command/new_post.py
@@ -27,6 +27,7 @@ Features
Bugfixes
--------

* Ignore ``NEW_POST_DATE_PATH`` when creating pages (Issue #2699)
* Ensure ``post.updated`` is timezone-aware (Issue #2698)
* Pass previously missing post object and language to reST compiler
and language to Markdown compiler (for shortcodes)
@@ -208,6 +208,7 @@ COMPILERS = ${COMPILERS}

# Use date-based path when creating posts?
# Can be enabled on a per-post basis with `nikola new_post -d`.
# The setting is ignored when creating pages (`-d` still works).
# NEW_POST_DATE_PATH = False

# What format to use when creating posts with date paths?
@@ -242,7 +242,7 @@ def _execute(self, options, args):
import_file = options['import']
wants_available = options['available-formats']
date_path_opt = options['date-path']
date_path_auto = self.site.config['NEW_POST_DATE_PATH']
date_path_auto = self.site.config['NEW_POST_DATE_PATH'] and content_type == 'post'
date_path_format = self.site.config['NEW_POST_DATE_PATH_FORMAT'].strip('/')

if wants_available:

0 comments on commit 2f78cd5

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