From c1f11855e31e3975ef74c7d19304bee4e1b64e71 Mon Sep 17 00:00:00 2001 From: William Langford Date: Wed, 20 Feb 2019 20:50:08 -0500 Subject: [PATCH] Remove ruby dependency from website build --- Makefile.am | 18 +- configure.ac | 20 +- docs/.gitignore | 3 - docs/Pipfile | 11 ++ docs/Pipfile.lock | 85 +++++++++ docs/README.md | 25 +-- docs/build_manpage.py | 2 + docs/build_website.py | 62 +++++++ .../{2.download => download}/default.yml | 13 +- docs/content/{index => }/index.yml | 0 docs/content/{3.manual => manual}/manual.yml | 1 + .../{3.manual => manual}/v1.3/manual.yml | 46 ++--- .../{3.manual => manual}/v1.4/manual.yml | 0 .../{3.manual => manual}/v1.5/manual.yml | 0 .../{3.manual => manual}/v1.6/manual.yml | 0 .../{1.tutorial => tutorial}/default.yml | 0 docs/public/css/base.css | 173 ++++++++++++++++++ .../{default.liquid => default.html.j2} | 14 +- .../templates/{index.liquid => index.html.j2} | 10 +- .../{manual.liquid => manual.html.j2} | 32 ++-- .../{_footer.liquid => _footer.html.j2} | 2 +- .../shared/{_head.liquid => _head.html.j2} | 4 +- .../{_navbar.liquid => _navbar.html.j2} | 4 +- scripts/update-website | 2 +- 24 files changed, 426 insertions(+), 101 deletions(-) create mode 100644 docs/Pipfile create mode 100644 docs/Pipfile.lock create mode 100644 docs/build_manpage.py create mode 100755 docs/build_website.py rename docs/content/{2.download => download}/default.yml (94%) rename docs/content/{index => }/index.yml (100%) rename docs/content/{3.manual => manual}/manual.yml (99%) rename docs/content/{3.manual => manual}/v1.3/manual.yml (98%) rename docs/content/{3.manual => manual}/v1.4/manual.yml (100%) rename docs/content/{3.manual => manual}/v1.5/manual.yml (100%) rename docs/content/{3.manual => manual}/v1.6/manual.yml (100%) rename docs/content/{1.tutorial => tutorial}/default.yml (100%) create mode 100644 docs/public/css/base.css rename docs/templates/{default.liquid => default.html.j2} (60%) rename docs/templates/{index.liquid => index.html.j2} (90%) rename docs/templates/{manual.liquid => manual.html.j2} (75%) rename docs/templates/shared/{_footer.liquid => _footer.html.j2} (77%) rename docs/templates/shared/{_head.liquid => _head.html.j2} (84%) rename docs/templates/shared/{_navbar.liquid => _navbar.html.j2} (87%) diff --git a/Makefile.am b/Makefile.am index e1083fe7..9f2de435 100644 --- a/Makefile.am +++ b/Makefile.am @@ -136,8 +136,8 @@ TESTS_ENVIRONMENT = NO_VALGRIND=$(NO_VALGRIND) man_MANS = jq.1 if ENABLE_DOCS -jq.1: $(srcdir)/docs/content/3.manual/manual.yml - $(AM_V_GEN) ( cd ${abs_srcdir}/docs; '$(BUNDLER)' exec rake manpage ) > $@ || { rm -f $@; false; } +jq.1: $(srcdir)/docs/content/manual/manual.yml + $(AM_V_GEN) ( cd ${abs_srcdir}/docs; pipenv run python build_manpage.py ) > $@ || { rm -f $@; false; } jq.1.prebuilt: jq.1 $(AM_V_GEN) cp jq.1 $@ || { rm -f $@; false; } else @@ -165,8 +165,8 @@ install-binaries: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec DOC_FILES = docs/content docs/public docs/templates docs/site.yml \ - docs/Gemfile docs/Gemfile.lock docs/Rakefile docs/README.md \ - jq.1.prebuilt + docs/Pipfile docs/Pipfile.lock docs/build_website.py \ + docs/README.md jq.1.prebuilt EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \ jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c \ @@ -180,11 +180,11 @@ EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \ tests/modules/test_bind_order0.jq \ tests/modules/test_bind_order1.jq \ tests/modules/test_bind_order2.jq tests/onig.supp \ - tests/onig.test tests/setup tests/torture/input0.json \ - tests/optional.test tests/optionaltest \ - tests/utf8-truncate.jq tests/utf8test \ - tests/base64.test tests/base64test \ - tests/jq-f-test.sh tests/shtest + tests/onig.test tests/setup tests/torture/input0.json \ + tests/optional.test tests/optionaltest \ + tests/utf8-truncate.jq tests/utf8test \ + tests/base64.test tests/base64test \ + tests/jq-f-test.sh tests/shtest diff --git a/configure.ac b/configure.ac index 97f4eab4..e8c6a71e 100644 --- a/configure.ac +++ b/configure.ac @@ -74,7 +74,7 @@ dnl Code coverage AC_ARG_ENABLE([gcov], AC_HELP_STRING([--enable-gcov], [enable gcov code coverage tool])) -dnl Don't attempt to build docs if there's no Ruby lying around +dnl Don't attempt to build docs if python deps aren't installed AC_ARG_ENABLE([docs], AC_HELP_STRING([--disable-docs], [don't build docs])) @@ -87,25 +87,25 @@ AC_ARG_ENABLE([all-static], AC_HELP_STRING([--enable-all-static], [link jq with static libraries only])) AS_IF([test "x$enable_docs" != "xno"],[ - AC_CHECK_PROGS(bundle_cmd, bundle) + AC_CHECK_PROGS(pipenv_cmd, pipenv) - AC_CACHE_CHECK([for Ruby dependencies], [jq_cv_ruby_deps], - [jq_cv_ruby_deps=yes; - AS_IF([test "x$bundle_cmd" = "x" || \ - ! bmsg="`cd ${srcdir}/docs; "$bundle_cmd" check 2>/dev/null`"],[ - AC_MSG_WARN([$bmsg]) + AC_CACHE_CHECK([for Python dependencies], [jq_cv_python_deps], + [jq_cv_python_deps=yes; + AS_IF([test "x$pipenv_cmd" = "x" || \ + ! bmsg="`cd ${srcdir}/docs; LC_ALL=$LANG "$pipenv_cmd" check`"],[ + AC_MSG_ERROR([$bmsg]) cat < for more info on RVM. +Though, you may need to say pip3 instead, depending on your system. Once +you have pipenv installed, you can install the dependencies by running +`pipenv install` from the `docs` directory. -Once RVM is installed, you can install all the dependencies for jq's -documentation build by running this from the `docs` directory: +Once this is done, rerun `./configure` in the jq root directory and then +the Makefile will be able to generate the jq manpage. - bundle install - -When bundle manages to install the dependencies, rerun `./configure` -in the jq root directory and then the Makefile will be able to -generate the jq manpage. +To build the website, run `pipenv run ./build_website.py` from inside +the `docs` directory. diff --git a/docs/build_manpage.py b/docs/build_manpage.py new file mode 100644 index 00000000..ab730481 --- /dev/null +++ b/docs/build_manpage.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +print("Manpage build not yet supported") diff --git a/docs/build_website.py b/docs/build_website.py new file mode 100755 index 00000000..2dd27036 --- /dev/null +++ b/docs/build_website.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +import glob +import itertools +from jinja2 import Environment, FileSystemLoader, Markup, select_autoescape, contextfunction +from markdown import markdown +import os +import os.path +import re +import shutil +import yaml + +env = Environment( + loader=FileSystemLoader('templates'), + autoescape=select_autoescape(['html.j2']), +) + +def load_yml_file(fn): + with open(fn) as f: + return yaml.load(f) + +env.filters['search_id'] = lambda input: input.replace(r'`', '') +env.filters['section_id'] = lambda input: re.sub(r"[^a-zA-Z0-9_]", '', input) +env.filters['entry_id'] = lambda input: re.sub(r"[ `]", '', input) +env.filters['markdownify'] = lambda input: Markup(markdown(input)) +env.filters['no_paragraph'] = lambda input: Markup(re.sub(r"", '', input)) + +env.globals['unique_id'] = contextfunction(lambda ctx: str(next(ctx['unique_ctr']))) + + +env.globals.update(load_yml_file('site.yml')) + + +env.globals['navigation'] = ['tutorial', 'download', 'manual'] + +def generate_file(env, fname='content/1.tutorial/default.yml'): + path, base = os.path.split(fname) + path = os.path.relpath(path, 'content') + output_dir = os.path.join('output', path) + output_path = os.path.join(output_dir, 'index.html') + + template_name = re.sub(r".yml$", '.html.j2', base) + + ctx = load_yml_file(fname) + ctx.update(unique_ctr=itertools.count(1), permalink=path) + os.makedirs(output_dir, exist_ok=True) + env.get_template(template_name).stream(ctx).dump(output_path, encoding='utf-8') + + +def copy_public_files(root=''): + for f in os.scandir(os.path.join('public', root)): + src = os.path.join(root, f.name) + dst = os.path.join('output', src) + if f.is_dir(): + os.makedirs(dst, exist_ok=True) + copy_public_files(src) + else: + shutil.copyfile(f.path, dst) + +copy_public_files() + +for fn in glob.glob('content/**/*.yml', recursive=True): + generate_file(env, fn) diff --git a/docs/content/2.download/default.yml b/docs/content/download/default.yml similarity index 94% rename from docs/content/2.download/default.yml rename to docs/content/download/default.yml index 2cf7d125..cfea1f09 100644 --- a/docs/content/2.download/default.yml +++ b/docs/content/download/default.yml @@ -180,14 +180,13 @@ body: #### Building the documentation - jq's documentation is compiled into static HTML using - [Bonsai](http://www.tinytree.info). To view the documentation - locally, run `rake serve` (or `bundle exec rake serve`) from the - docs/ subdirectory. To build the docs just `rake build` from the - docs subdirectory. You'll need a few Ruby dependencies, which can - be installed by following the instructions in `docs/README.md`. + jq's documentation is compiled into static HTML using Python. + To build the docs, run `pipenv run python3 build_website.py` from + the docs/ subdirectory. To serve them locally, you can run + `python3 -m SimpleHTTPServer`. You'll need a few Python dependencies, + which can be installed by following the instructions in `docs/README.md`. The man page is built by `make jq.1`, or just `make`, also from - the YAML docs, and you'll still need the Ruby dependencies to + the YAML docs, and you'll still need the Python dependencies to build the manpage. diff --git a/docs/content/index/index.yml b/docs/content/index.yml similarity index 100% rename from docs/content/index/index.yml rename to docs/content/index.yml diff --git a/docs/content/3.manual/manual.yml b/docs/content/manual/manual.yml similarity index 99% rename from docs/content/3.manual/manual.yml rename to docs/content/manual/manual.yml index 150565b4..a9d2fcd2 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/manual/manual.yml @@ -2230,6 +2230,7 @@ sections: STRING | FILTER( [REGEX, FLAGS] ) where: + * STRING, REGEX and FLAGS are jq strings and subject to jq string interpolation; * REGEX, after string interpolation, should be a valid PCRE regex; * FILTER is one of `test`, `match`, or `capture`, as described below. diff --git a/docs/content/3.manual/v1.3/manual.yml b/docs/content/manual/v1.3/manual.yml similarity index 98% rename from docs/content/3.manual/v1.3/manual.yml rename to docs/content/manual/v1.3/manual.yml index 08603207..4153baec 100644 --- a/docs/content/3.manual/v1.3/manual.yml +++ b/docs/content/manual/v1.3/manual.yml @@ -441,7 +441,7 @@ sections: input: 5 output: [6] - - title: `length` + - title: '`length`' body: | The builtin function `length` gets the length of various @@ -462,7 +462,7 @@ sections: input: '[[1,2], "string", {"a":2}, null]' output: [2, 6, 1, 0] - - title: `keys` + - title: '`keys`' body: | The builtin function `keys`, when given an object, returns @@ -485,7 +485,7 @@ sections: input: '[42,3,35]' output: ['[0,1,2]'] - - title: `has` + - title: '`has`' body: | The builtin function `has` returns whether the input object @@ -504,7 +504,7 @@ sections: input: '[[0,1], ["a","b","c"]]' output: ['[false, true]'] - - title: `to_entries`, `from_entries`, `with_entries` + - title: '`to_entries`, `from_entries`, `with_entries`' body: | These functions convert between an object and an array of @@ -529,14 +529,14 @@ sections: output: ['{"KEY_a": 1, "KEY_b": 2}'] - - title: `select` + - title: '`select`' body: | The function `select(foo)` produces its input unchanged if `foo` returns true for that input, and produces no output otherwise. - It's useful for filtering lists: `[1,2,3] | map(select(. >= 2))` + It's useful for filtering lists: '`[1,2,3] | map(select(. >= 2))`' will give you `[3]`. examples: @@ -544,7 +544,7 @@ sections: input: '[1,5,3,0,7]' output: ['[5,3,7]'] - - title: `empty` + - title: '`empty`' body: | `empty` returns no results. None at all. Not even `null`. @@ -559,7 +559,7 @@ sections: input: 'null' output: ['[1,2,3]'] - - title: `map(x)` + - title: '`map(x)`' body: | For any filter `x`, `map(x)` will run that filter for each @@ -574,7 +574,7 @@ sections: input: '[1,2,3]' output: ['[2,3,4]'] - - title: `add` + - title: '`add`' body: | The filter `add` takes as input an array, and produces as @@ -596,7 +596,7 @@ sections: input: '[]' output: ["null"] - - title: `range` + - title: '`range`' body: | The `range` function produces a range of numbers. `range(4;10)` @@ -612,7 +612,7 @@ sections: input: 'null' output: ['[2,3]'] - - title: `tonumber` + - title: '`tonumber`' body: | The `tonumber` function parses its input as a number. It @@ -624,7 +624,7 @@ sections: input: '[1, "1"]' output: [1, 1] - - title: `tostring` + - title: '`tostring`' body: | The `tostring` function prints its input as a @@ -636,7 +636,7 @@ sections: input: '[1, "1", [1]]' output: ['"1"', '"1"', '"[1]"'] - - title: `type` + - title: '`type`' body: | The `type` function returns the type of its argument as a @@ -648,7 +648,7 @@ sections: input: '[0, false, [], {}, null, "hello"]' output: ['["number", "boolean", "array", "object", "null", "string"]'] - - title: `sort, sort_by` + - title: '`sort, sort_by`' body: | The `sort` functions sorts its input, which must be an @@ -680,7 +680,7 @@ sections: input: '[{"foo":4, "bar":10}, {"foo":3, "bar":100}, {"foo":2, "bar":1}]' output: ['[{"foo":2, "bar":1}, {"foo":3, "bar":100}, {"foo":4, "bar":10}]'] - - title: `group_by` + - title: '`group_by`' body: | `group_by(.foo)` takes as input an array, groups the @@ -697,7 +697,7 @@ sections: input: '[{"foo":1, "bar":10}, {"foo":3, "bar":100}, {"foo":1, "bar":1}]' output: ['[[{"foo":1, "bar":10}, {"foo":1, "bar":1}], [{"foo":3, "bar":100}]]'] - - title: `min`, `max`, `min_by`, `max_by` + - title: '`min`, `max`, `min_by`, `max_by`' body: | Find the minimum or maximum element of the input array. The @@ -713,7 +713,7 @@ sections: input: '[{"foo":1, "bar":14}, {"foo":2, "bar":3}]' output: ['{"foo":2, "bar":3}'] - - title: `unique` + - title: '`unique`' body: | The `unique` function takes as input an array and produces @@ -725,7 +725,7 @@ sections: input: '[1,2,5,3,5,3,1,3]' output: ['[1,2,3,5]'] - - title: `reverse` + - title: '`reverse`' body: | This function reverses an array. @@ -735,7 +735,7 @@ sections: input: '[1,2,3,4]' output: ['[4,3,2,1]'] - - title: `contains` + - title: '`contains`' body: | The filter `contains(b)` will produce true if b is @@ -764,7 +764,7 @@ sections: input: '{"foo": 12, "bar":[1,2,{"barp":12, "blip":13}]}' output: ['false'] - - title: `recurse` + - title: '`recurse`' body: | The `recurse` function allows you to search through a @@ -796,7 +796,7 @@ sections: - '{"foo":[]}' - - title: "String interpolation - `\(foo)`" + - title: String interpolation - `\(foo)` body: | Inside a string, you can put an expression inside parens @@ -882,7 +882,7 @@ sections: - title: Conditionals and Comparisons entries: - - title: `==`, `!=` + - title: '`==`, `!=`' body: | The expression 'a == b' will produce 'true' if the result of a and b @@ -931,7 +931,7 @@ sections: input: 2 output: ['"many"'] - - title: `>, >=, <=, <` + - title: '`>, >=, <=, <`' body: | The comparison operators `>`, `>=`, `<=`, `<` return whether diff --git a/docs/content/3.manual/v1.4/manual.yml b/docs/content/manual/v1.4/manual.yml similarity index 100% rename from docs/content/3.manual/v1.4/manual.yml rename to docs/content/manual/v1.4/manual.yml diff --git a/docs/content/3.manual/v1.5/manual.yml b/docs/content/manual/v1.5/manual.yml similarity index 100% rename from docs/content/3.manual/v1.5/manual.yml rename to docs/content/manual/v1.5/manual.yml diff --git a/docs/content/3.manual/v1.6/manual.yml b/docs/content/manual/v1.6/manual.yml similarity index 100% rename from docs/content/3.manual/v1.6/manual.yml rename to docs/content/manual/v1.6/manual.yml diff --git a/docs/content/1.tutorial/default.yml b/docs/content/tutorial/default.yml similarity index 100% rename from docs/content/1.tutorial/default.yml rename to docs/content/tutorial/default.yml diff --git a/docs/public/css/base.css b/docs/public/css/base.css new file mode 100644 index 00000000..e9bb818d --- /dev/null +++ b/docs/public/css/base.css @@ -0,0 +1,173 @@ +body { + padding-top: 80px; +} + +.container { + max-width: 970px; +} + +/* index.liquid *******************************************/ +#blurb { + padding-top: 40px; +} +#blurb p { + font-size: 1.9em; +} +#blurb .btn-group { + margin: 4px; +} + +#multiblurb { + line-height: 1.7; + text-align: center; + font-size: 12pt; +} +#multiblurb code { + border: 0; + font-size: 12pt; +} + +#news { + font-size: 12pt; +} +#news .date { + font-style: italic; +} + +/* default.liquid *****************************************/ +.tutorial-example { + position: relative; + margin-bottom: 10px; +} +.tutorial-example pre { + margin-bottom: 0px; +} +.tutorial-example a { + position: absolute; + top: 0px; + right: 0px; + padding: 15px 8px; + color: #777777; + font-weight: bold; + line-height: 10px; + font-size: 12px; + border-left: 1px solid #DDDDDD; + display: block; +} +.tutorial-example .accordion-body pre { + margin: 0 4px; + border-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +@media print { + .tutorial-example a { + display: none; + } +} +/* manual.liquid ******************************************/ +section { + padding-top: 24px; +} + +h3 code { + border: 0; + font-size: 20px; +} + +@media (max-width: 991px) { + #navcolumn { + /* Put nav column above manual content */ + position: relative !important; + margin-bottom: 60px; + } +} +@media (min-width: 992px) { + #manualcontent { + /* Put nav column left of manual content */ + padding-left: 280px; + } +} +.nav-pills { + margin-bottom: 20px; +} + .nav-pills li a { + padding: 8px 12px; +} + +.manual-example table { + border-top: 1px solid #E5E5E5; +} +.manual-example table td { + white-space: pre-wrap; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; +} +.manual-example table td.jqprogram { + font-weight: bold; +} +.manual-example table th { + text-align: right; + padding-right: 10px; +} + +@media print { + #navcolumn { + display: none !important; + } + + .manual-example { + display: block !important; + height: auto !important; + } + + .jqplay-btn { + display: none !important; + } +} +/* shared/_footer.liquid **********************************/ +footer { + background-color: #F5F5F5; + padding: 20px 0; + margin-top: 40px; + color: #999999; + text-align: center; +} +footer p { + margin: 8px 0; +} + +/* typeahead **********************************************/ +.twitter-typeahead { + width: 100%; +} + +.tt-menu { + width: 100%; + background-color: #fff; + padding: 8px 0; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); +} + +.tt-suggestion { + padding: 3px 20px; +} +.tt-suggestion:hover { + cursor: pointer; + color: #fff; + background-color: #446e9b; +} +.tt-suggestion.tt-cursor { + color: #fff; + background-color: #446e9b; +} +.tt-suggestion p { + margin: 0; +} diff --git a/docs/templates/default.liquid b/docs/templates/default.html.j2 similarity index 60% rename from docs/templates/default.liquid rename to docs/templates/default.html.j2 index 16b42278..7830eb37 100644 --- a/docs/templates/default.liquid +++ b/docs/templates/default.html.j2 @@ -1,26 +1,26 @@ -{% include "shared/head" %} +{% include "shared/_head.html.j2" %} -{% include "shared/navbar" %} +{% include "shared/_navbar.html.j2" %}

{{headline}}

{% for item in body %} {% if item.text %} - {{ item.text | replace: '$JQ_VERSION', jq_version | markdownify }} + {{ item.text | replace('$JQ_VERSION', jq_version) | markdownify }} {% endif %} {% if item.command %} - {% capture resultID %}{{ "result" | unique}}{% endcapture %} + {% set resultID = unique_id() %}
{{item.command}}
- Show result + Show result
-
+
{{item.result}}
@@ -29,6 +29,6 @@
-{% include "shared/footer" %} +{% include "shared/_footer.html.j2" %} diff --git a/docs/templates/index.liquid b/docs/templates/index.html.j2 similarity index 90% rename from docs/templates/index.liquid rename to docs/templates/index.html.j2 index 35986d59..4567ef55 100644 --- a/docs/templates/index.liquid +++ b/docs/templates/index.html.j2 @@ -1,9 +1,9 @@ -{% include "shared/head" %} +{% include "shared/_head.html.j2" %} - -{% include "shared/navbar" %} + +{% include "shared/_navbar.html.j2" %}
-{% include "shared/footer" %} +{% include "shared/_footer.html.j2" %} diff --git a/docs/templates/manual.liquid b/docs/templates/manual.html.j2 similarity index 75% rename from docs/templates/manual.liquid rename to docs/templates/manual.html.j2 index f1d7985a..21f9ad28 100644 --- a/docs/templates/manual.liquid +++ b/docs/templates/manual.html.j2 @@ -1,9 +1,9 @@ -{% include "shared/head" %} +{% include "shared/_head.html.j2" %} -{% include "shared/navbar" %} +{% include "shared/_navbar.html.j2" %}
@@ -32,41 +32,41 @@ {% for section in sections %}

{{section.title}}

- {{section.body | markdownify}} + {{ (section.body | markdownify) if section.body }} {% for entry in section.entries %}

- {{entry.title | markdownify | no_paragraph}} + {{entry.title | markdownify | no_paragraph }} {% if entry.subtitle %}{{entry.subtitle}}{% endif %}

{{entry.body | markdownify}} {% if entry.examples %}
- {% capture exampleID %}{{ "" | unique }}{% endcapture %} + {% set exampleID = unique_id() %} - {% if entry.examples[1] %}Examples{%else%}Example{%endif%} + {% if entry.examples | length > 1 %}Examples{%else%}Example{%endif%}
{% for example in entry.examples %} - - - {% unless example.output[0] %} + + + {% if not example.output[0] %} - {% endunless %} + {% endif %} {% for output in example.output %} - {% if forloop.index == 1 %} + {% if loop.first %} {% else %} {% endif %} - + {% endfor %}
jq '{{example.program | escape}}'
Input{{example.input | escape}}
jq '{{ example.program }}'
Input{{ example.input }}
Output none
Output{{output | escape}}{{ output }}
@@ -82,15 +82,15 @@
-{% include "shared/footer" %} +{% include "shared/_footer.html.j2" %} diff --git a/docs/templates/shared/_footer.liquid b/docs/templates/shared/_footer.html.j2 similarity index 77% rename from docs/templates/shared/_footer.liquid rename to docs/templates/shared/_footer.html.j2 index 41202da8..511f0b1f 100644 --- a/docs/templates/shared/_footer.liquid +++ b/docs/templates/shared/_footer.html.j2 @@ -1,6 +1,6 @@ diff --git a/docs/templates/shared/_head.liquid b/docs/templates/shared/_head.html.j2 similarity index 84% rename from docs/templates/shared/_head.liquid rename to docs/templates/shared/_head.html.j2 index b1457aa9..b6fafd35 100644 --- a/docs/templates/shared/_head.liquid +++ b/docs/templates/shared/_head.html.j2 @@ -7,9 +7,9 @@ {{headline}} - + - +