diff --git a/docs/settings.rst b/docs/settings.rst index ffcddc7a..a666aa52 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -149,6 +149,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 0dc3667f..8b129c5c 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -353,7 +353,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)