diff options
| author | 2014-03-09 03:14:44 +0100 | |
|---|---|---|
| committer | 2014-03-09 03:14:44 +0100 | |
| commit | de1d7f85f5f67b269178ea05b7c59deb21ac1720 (patch) | |
| tree | 3125810eecb495e9ce216dd95561cd1dd3977235 /nikola/plugins/compile/pandoc.py | |
| parent | c14a6f46d2a76a9c228b6c2543939315068fad5f (diff) | |
| parent | fa50632a9d87c3989566fed3e49c160a132e0d14 (diff) | |
Merge tag 'upstream/6.4.0'
Upstream version 6.4.0
Diffstat (limited to 'nikola/plugins/compile/pandoc.py')
| -rw-r--r-- | nikola/plugins/compile/pandoc.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/nikola/plugins/compile/pandoc.py b/nikola/plugins/compile/pandoc.py index 57c7d71..654c7c8 100644 --- a/nikola/plugins/compile/pandoc.py +++ b/nikola/plugins/compile/pandoc.py @@ -40,7 +40,7 @@ from nikola.utils import req_missing, makedirs try: from collections import OrderedDict except ImportError: - OrderedDict = None # NOQA + OrderedDict = dict # NOQA class CompilePandoc(PageCompiler): @@ -56,11 +56,8 @@ class CompilePandoc(PageCompiler): if e.strreror == 'No such file or directory': req_missing(['pandoc'], 'build this site (compile with pandoc)', python=False) - 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)) @@ -70,4 +67,4 @@ class CompilePandoc(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')) |
