aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/compile/bbcode.py
diff options
context:
space:
mode:
Diffstat (limited to 'nikola/plugins/compile/bbcode.py')
-rw-r--r--nikola/plugins/compile/bbcode.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/nikola/plugins/compile/bbcode.py b/nikola/plugins/compile/bbcode.py
index 5345be3..0961ffe 100644
--- a/nikola/plugins/compile/bbcode.py
+++ b/nikola/plugins/compile/bbcode.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 CompileBbcode(PageCompiler):
@@ -66,11 +66,8 @@ class CompileBbcode(PageCompiler):
output = self.parser.format(data)
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))
@@ -80,4 +77,4 @@ class CompileBbcode(PageCompiler):
for k, v in metadata.items():
fd.write('.. {0}: {1}\n'.format(k, v))
fd.write('-->[/note]\n\n')
- fd.write("Write your post here.")
+ fd.write("Write your {0} here.".format('page' if is_page else 'post'))