Merge pull request #2371 from oulenz/draft_pages

Allow pages to have draft status, like articles
This commit is contained in:
Justin Mayer 2018-07-04 18:20:57 +02:00 committed by GitHub
commit ec1914d3bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 108 additions and 17 deletions

View file

@ -533,9 +533,9 @@ your settings file.
Publishing drafts
=================
If you want to publish an article as a draft (for friends to review before
publishing, for example), you can add a ``Status: draft`` attribute to its
metadata. That article will then be output to the ``drafts`` folder and not
If you want to publish an article or a page as a draft (for friends to review
before publishing, for example), you can add a ``Status: draft`` attribute to
its metadata. That article will then be output to the ``drafts`` folder and not
listed on the index page nor on any category or tag page.
If your articles should be automatically published as a draft (to not accidentally

View file

@ -445,6 +445,24 @@ respectively.
The location we will save the page which doesn't use the default language.
.. data:: DRAFT_PAGE_URL = 'drafts/pages/{slug}.html'
The URL used to link to a page draft.
.. data:: DRAFT_PAGE_SAVE_AS = 'drafts/pages/{slug}.html'
The actual location a page draft is saved at.
.. data:: DRAFT_PAGE_LANG_URL = 'drafts/pages/{slug}-{lang}.html'
The URL used to link to a page draft which doesn't use the default
language.
.. data:: DRAFT_PAGE_LANG_SAVE_AS = 'drafts/pages/{slug}-{lang}.html'
The actual location a page draft which doesn't use the default language is
saved at.
.. data:: CATEGORY_URL = 'category/{slug}.html'
The URL to use for a category.

View file

@ -86,6 +86,7 @@ categories A list of (category, articles) tuples, containing
all the categories and corresponding articles (values)
pages The list of pages
hidden_pages The list of hidden pages
draft_pages The list of draft pages
============= ===================================================
@ -423,7 +424,7 @@ metadata Page header metadata `dict`.
save_as Location to save the page.
slug Page slug.
source_path Full system path of the page source file.
status The page status, can be any of 'published' or
status The page status, can be any of 'published', 'hidden' or
'draft'.
summary Rendered summary content.
tags List of :ref:`Tag <object-author_cat_tag>`