diff --git a/docs/settings.rst b/docs/settings.rst index db5c0164..77d197cb 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -146,6 +146,7 @@ Setting name (default value) What doe These templates need to use ``DIRECT_TEMPLATES`` setting. `ASCIIDOC_OPTIONS` (``[]``) A list of options to pass to AsciiDoc. See the `manpage `_ +`DRAFT_PATH` (``drafts``) Path where drafts will be saved. ===================================================================== ===================================================================== .. [#] Default is the system locale. diff --git a/pelican/generators.py b/pelican/generators.py index 02412440..a5f31f97 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -347,7 +347,8 @@ class ArticlesGenerator(Generator): def generate_drafts(self, write): """Generate drafts pages.""" for article in self.drafts: - write(os.path.join('drafts', '%s.html' % article.slug), + write(os.path.join(self.settings.get('DRAFT_PATH', 'drafts'), + '%s.html' % article.slug), self.get_template(article.template), self.context, article=article, category=article.category, all_articles=self.articles)