diff options
| author | 2014-03-09 03:14:40 +0100 | |
|---|---|---|
| committer | 2014-03-09 03:14:40 +0100 | |
| commit | fa50632a9d87c3989566fed3e49c160a132e0d14 (patch) | |
| tree | 81f58cc0dcfbb34710856b59c034bc47c53d91dc /nikola/plugins/compile/asciidoc.py | |
| parent | 2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff) | |
Imported Upstream version 6.4.0upstream/6.4.0
Diffstat (limited to 'nikola/plugins/compile/asciidoc.py')
| -rw-r--r-- | nikola/plugins/compile/asciidoc.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/nikola/plugins/compile/asciidoc.py b/nikola/plugins/compile/asciidoc.py index 12cb4bf..68f96d9 100644 --- a/nikola/plugins/compile/asciidoc.py +++ b/nikola/plugins/compile/asciidoc.py @@ -40,7 +40,7 @@ from nikola.utils import makedirs, req_missing try: from collections import OrderedDict except ImportError: - OrderedDict = None # NOQA + OrderedDict = dict # NOQA class CompileAsciiDoc(PageCompiler): @@ -57,11 +57,8 @@ class CompileAsciiDoc(PageCompiler): if e.strreror == 'No such file or directory': req_missing(['asciidoc'], 'build this site (compile with asciidoc)', 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)) @@ -71,4 +68,4 @@ class CompileAsciiDoc(PageCompiler): for k, v in metadata.items(): fd.write('.. {0}: {1}\n'.format(k, v)) fd.write("/////////////////////////////////////////////\n") - fd.write("\nWrite your post here.") + fd.write("\nWrite your {0} here.".format('page' if is_page else 'post')) |
