diff piecrust/sources/posts.py @ 259:adb066ffb363

Merge docs.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 22 Feb 2015 22:03:54 -0800
parents ba857c693c72
children 0641fe5c3ef9
line wrap: on
line diff
--- a/piecrust/sources/posts.py	Sun Feb 22 22:02:59 2015 -0800
+++ b/piecrust/sources/posts.py	Sun Feb 22 22:03:54 2015 -0800
@@ -53,9 +53,9 @@
                 ext = self.default_auto_format
 
         replacements = {
-                'year': '%04d' % year,
-                'month': '%02d' % month,
-                'day': '%02d' % day,
+                'year': '%04d' % year if year is not None else None,
+                'month': '%02d' % month if month is not None else None,
+                'day': '%02d' % day if day is not None else None,
                 'slug': slug,
                 'ext': ext
                 }