-<p>Posted{% if article.authors %} by {% for author in article.authors %}<a href="{{ author.url|format_siteurl|e }}">{{ author|e }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl|e }}">{{ article.category|e }}</a>.{% if article.modified %} <span class="m-label m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}{% if article.archived == 'True' %} <span class="m-label m-warning">archived</span>{% endif %}{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl|e }}">{{ tag|e }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
+<p>Posted{% if article.authors %} by {% for author in article.authors %}<a href="{{ author.url|format_siteurl|e }}">{{ author|e }}</a>{% endfor %}{% endif %} on <time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> in <a href="{{ article.category.url|format_siteurl|e }}">{{ article.category|e }}</a>.{% if article.modified %} <span class="m-label m-success">updated <time datetime="{{ article.modified.isoformat() }}">{{ article.locale_modified }}</time></span>{% endif %}{% if article.archived == 'True' %} <span class="m-label m-warning">archived</span>{% endif %}{% if article.status == 'draft' %} <span class="m-label m-dim">draft</span>{% endif %}{% if article.tags %} Tags: {% for tag in article.tags %}<a href="{{ tag.url|format_siteurl|e }}">{{ tag|e }}</a>{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}</p>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>An article | A Pelican Blog</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i" />
+ <link rel="stylesheet" href="static/m-dark.css" />
+ <link rel="canonical" href="article.html" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="./" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m">A Pelican Blog</a>
+ </div>
+ </div>
+</nav></header>
+<main>
+<div class="m-container">
+ <div class="m-row">
+ <article class="m-col-m-10 m-nopadb">
+ <header>
+ <h1><a href="article.html" rel="bookmark" title="Permalink to An article">
+ <time class="m-date" datetime="2017-12-09T00:00:00+00:00">
+ Dec <span class="m-date-day">09</span> 2017
+ </time>
+ An article
+ </a></h1>
+ </header>
+ <div class="m-clearfix-l"></div>
+ <footer>
+ <p>Posted on <time datetime="2017-12-09T00:00:00+00:00">Dec 09, 2017</time> in <a href="category-misc.html">misc</a>. <span class="m-label m-dim">draft</span></p>
+ </footer>
+ </article>
+ <nav class="m-navpanel m-col-m-2">
+ <h3>Categories</h3>
+ <ol class="m-block-bar-m">
+ <li><em class="m-text m-dim">(none yet)</em></li>
+ </ol>
+ </nav>
+ </div>
+</div>
+</main>
+</body>
+</html>
})
self.assertEqual(*self.actual_expected_contents('index.html'))
+
+class Draft(BlogTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, 'draft', *args, **kwargs)
+
+ def test(self):
+ self.run_pelican({
+ 'DRAFT_URL': '{slug}.html',
+ 'DRAFT_SAVE_AS': '{slug}.html'
+ })
+
+ self.assertEqual(*self.actual_expected_contents('article.html'))