aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/jinjify.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/jinjify.py')
-rwxr-xr-xscripts/jinjify.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/jinjify.py b/scripts/jinjify.py
index 30f8029..abd18e9 100755
--- a/scripts/jinjify.py
+++ b/scripts/jinjify.py
@@ -18,7 +18,8 @@ dumb_replacements = [
["og: http://ogp.me/ns# \\", "og: http://ogp.me/ns#"],
["article: http://ogp.me/ns/article# \\", "article: http://ogp.me/ns/article#"],
["fb: http://ogp.me/ns/fb# \\", "fb: http://ogp.me/ns/fb#"],
- ['dir="rtl" \\', 'dir="rtl"']
+ ['dir="rtl" \\', 'dir="rtl"'],
+ ['sorted(translations)', 'translations|sort'],
]
dumber_replacements = [
@@ -70,8 +71,7 @@ def jinjify(in_theme, out_theme):
child = os.path.basename(out_theme.rstrip('/'))
mappings = {
'base-jinja': 'base',
- 'bootstrap-jinja': 'base-jinja',
- 'bootstrap3-jinja': 'bootstrap-jinja',
+ 'bootstrap3-jinja': 'base-jinja',
}
if child in mappings:
@@ -84,7 +84,7 @@ def jinjify(in_theme, out_theme):
outf.write(u"jinja\n")
# Copy assets in bootstrap/bootstrap3
- if child in ('bootstrap-jinja', 'bootstrap3-jinja'):
+ if child == 'bootstrap3-jinja':
shutil.rmtree(os.path.join(out_theme, "assets"))
shutil.copytree(
os.path.join(in_theme, "assets"), os.path.join(out_theme, "assets"),
@@ -220,7 +220,6 @@ if __name__ == "__main__":
print('Performing standard conversions:')
for m, j in (
('nikola/data/themes/base', 'nikola/data/themes/base-jinja'),
- ('nikola/data/themes/bootstrap', 'nikola/data/themes/bootstrap-jinja'),
('nikola/data/themes/bootstrap3', 'nikola/data/themes/bootstrap3-jinja')
):
print(' {0} -> {1}'.format(m, j))