diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/document_path_handlers.py | 22 | ||||
| -rwxr-xr-x | scripts/getbaseline.sh | 4 | ||||
| -rwxr-xr-x | scripts/import_po.py | 1 | ||||
| -rwxr-xr-x | scripts/jinjify.py | 1 |
4 files changed, 26 insertions, 2 deletions
diff --git a/scripts/document_path_handlers.py b/scripts/document_path_handlers.py new file mode 100755 index 0000000..692c8e0 --- /dev/null +++ b/scripts/document_path_handlers.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +from __future__ import print_function, unicode_literals +from nikola import nikola +n = nikola.Nikola() +n.init_plugins() + +print(""".. title: Path Handlers for Nikola +.. slug: path-handlers +.. author: The Nikola Team + +Nikola supports special links with the syntax ``link://kind/name``. Here is +the description for all the supported kinds. + +.. class:: dl-horizontal +""") + +for k in sorted(n.path_handlers.keys()): + v = n.path_handlers[k] + print(k) + print('\n'.join(' '+l.strip() for l in v.__doc__.splitlines())) + print() diff --git a/scripts/getbaseline.sh b/scripts/getbaseline.sh index 719fbe5..9006579 100755 --- a/scripts/getbaseline.sh +++ b/scripts/getbaseline.sh @@ -1,8 +1,8 @@ #!/bin/bash cd tests/data for i in $@; do - if [[ $i == '2.7' ]]; then - # we only support 2.7 now + if [[ $i == '3.5' || $i == '2.7' ]]; then + # we only support 2.7 and 3.5 wget https://github.com/getnikola/invariant-builds/archive/v$i'.zip' unzip 'v'$i'.zip' rm -rf baseline$i diff --git a/scripts/import_po.py b/scripts/import_po.py index 0429b42..2f887c5 100755 --- a/scripts/import_po.py +++ b/scripts/import_po.py @@ -15,6 +15,7 @@ if 'nopull' not in sys.argv: trans_files = glob(os.path.join('translations', 'nikola.messages', '*.po')) for fname in trans_files: lang = os.path.splitext(os.path.basename(fname))[0].lower() + lang = lang.replace('@', '_') outf = os.path.join('nikola', 'data', 'themes', 'base', 'messages', 'messages_{0}.py'.format(lang)) po = polib.pofile(fname) diff --git a/scripts/jinjify.py b/scripts/jinjify.py index abd18e9..3a3a9d8 100755 --- a/scripts/jinjify.py +++ b/scripts/jinjify.py @@ -14,6 +14,7 @@ dumb_replacements = [ ["{% if any(post.is_mathjax for post in posts) %}", '{% if posts|selectattr("is_mathjax")|list %}'], ["json.dumps(title)", "title|tojson"], ["{{ parent.extra_head() }}", "{{ super() }}"], + ["{{ parent.content() }}", "{{ super() }}"], ["prefix='\\", "prefix='"], ["og: http://ogp.me/ns# \\", "og: http://ogp.me/ns#"], ["article: http://ogp.me/ns/article# \\", "article: http://ogp.me/ns/article#"], |
