.rst.draft -> .draft.rst so draft blog post still get syntax highlighting

This commit is contained in:
str4d
2015-01-20 10:11:47 +00:00
parent c59a35f46f
commit bcdedcde43
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ How to use the blog
Writing draft posts
-------------------
To write a draft post, create the file with the suffix '.rst.draft'. Post files
To write a draft post, create the file with the suffix '.draft.rst'. Post files
with this suffix will be visible at their post URL, but will not be shown in
the blog index. To publish the draft post, change the filename to remove the
'.draft' suffix.

View File

@ -92,7 +92,7 @@ def render_blog_post(slug):
path = safe_join(BLOG_DIR, slug + ".rst")
if not os.path.exists(path):
# check for drafts
path = safe_join(BLOG_DIR, slug + ".rst.draft")
path = safe_join(BLOG_DIR, slug + ".draft.rst")
if not os.path.exists(path):
abort(404)