summaryrefslogtreecommitdiffstats
path: root/nikola/plugins/compile/markdown/__init__.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-03-09 03:14:40 +0100
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-03-09 03:14:40 +0100
commitfa50632a9d87c3989566fed3e49c160a132e0d14 (patch)
tree81f58cc0dcfbb34710856b59c034bc47c53d91dc /nikola/plugins/compile/markdown/__init__.py
parent2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff)
Imported Upstream version 6.4.0upstream/6.4.0
Diffstat (limited to 'nikola/plugins/compile/markdown/__init__.py')
-rw-r--r--nikola/plugins/compile/markdown/__init__.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/nikola/plugins/compile/markdown/__init__.py b/nikola/plugins/compile/markdown/__init__.py
index 1376b11..d0fa66a 100644
--- a/nikola/plugins/compile/markdown/__init__.py
+++ b/nikola/plugins/compile/markdown/__init__.py
@@ -54,7 +54,7 @@ except ImportError:
try:
from collections import OrderedDict
except ImportError:
- OrderedDict = None # NOQA
+ OrderedDict = dict # NOQA
from nikola.plugin_categories import PageCompiler
from nikola.utils import makedirs, req_missing
@@ -81,11 +81,8 @@ class CompileMarkdown(PageCompiler):
output = markdown(data, self.extensions)
out_file.write(output)
- def create_post(self, path, onefile=False, **kw):
- if OrderedDict is not None:
- metadata = OrderedDict()
- else:
- metadata = {}
+ def create_post(self, path, onefile=False, is_page=False, **kw):
+ metadata = OrderedDict()
metadata.update(self.default_metadata)
metadata.update(kw)
makedirs(os.path.dirname(path))
@@ -95,4 +92,4 @@ class CompileMarkdown(PageCompiler):
for k, v in metadata.items():
fd.write('.. {0}: {1}\n'.format(k, v))
fd.write('-->\n\n')
- fd.write("Write your post here.")
+ fd.write("Write your {0} here.".format('page' if is_page else 'post'))