.rst.draft -> .draft.rst so draft blog post still get syntax highlighting
This commit is contained in:
@ -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.
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user