aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/compile/wiki.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/wiki.py
parent2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff)
Imported Upstream version 6.4.0upstream/6.4.0
Diffstat (limited to 'nikola/plugins/compile/wiki.py')
-rw-r--r--nikola/plugins/compile/wiki.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/nikola/plugins/compile/wiki.py b/nikola/plugins/compile/wiki.py
index 9a365fa..f4858c7 100644
--- a/nikola/plugins/compile/wiki.py
+++ b/nikola/plugins/compile/wiki.py
@@ -40,7 +40,7 @@ from nikola.plugin_categories import PageCompiler
try:
from collections import OrderedDict
except ImportError:
- OrderedDict = None # NOQA
+ OrderedDict = dict # NOQA
from nikola.utils import makedirs, req_missing
@@ -62,11 +62,8 @@ class CompileWiki(PageCompiler):
output = HtmlEmitter(document).emit()
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))
@@ -75,4 +72,4 @@ class CompileWiki(PageCompiler):
'one-file format is not possible, use the -2 '
'option.')
with codecs.open(path, "wb+", "utf8") as fd:
- fd.write("Write your post here.")
+ fd.write("Write your {0} here.".format('page' if is_page else 'post'))