summaryrefslogtreecommitdiffstats
path: root/docs/templates
diff options
context:
space:
mode:
Diffstat (limited to 'docs/templates')
-rw-r--r--docs/templates/default.html.j2 (renamed from docs/templates/default.liquid)14
-rw-r--r--docs/templates/index.html.j2 (renamed from docs/templates/index.liquid)10
-rw-r--r--docs/templates/manual.html.j2 (renamed from docs/templates/manual.liquid)32
-rw-r--r--docs/templates/shared/_footer.html.j2 (renamed from docs/templates/shared/_footer.liquid)2
-rw-r--r--docs/templates/shared/_head.html.j2 (renamed from docs/templates/shared/_head.liquid)4
-rw-r--r--docs/templates/shared/_navbar.html.j2 (renamed from docs/templates/shared/_navbar.liquid)4
6 files changed, 33 insertions, 33 deletions
diff --git a/docs/templates/default.liquid b/docs/templates/default.html.j2
index 16b42278..7830eb37 100644
--- a/docs/templates/default.liquid
+++ b/docs/templates/default.html.j2
@@ -1,26 +1,26 @@
<!DOCTYPE html>
<html lang="en">
-{% include "shared/head" %}
+{% include "shared/_head.html.j2" %}
<body id="{{slug}}">
-{% include "shared/navbar" %}
+{% include "shared/_navbar.html.j2" %}
<div class="container">
<div class="row">
<h1>{{headline}}</h1>
{% 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() %}
<div class="tutorial-example">
<div class="accordion-heading">
<pre>{{item.command}}</pre>
- <a data-toggle="collapse" href="#{{resultID}}">Show result</a>
+ <a data-toggle="collapse" href="#result{{resultID}}">Show result</a>
</div>
- <div id="{{resultID}}" class="accordion-body collapse">
+ <div id="result{{resultID}}" class="accordion-body collapse">
<pre>{{item.result}}</pre>
</div>
</div>
@@ -29,6 +29,6 @@
</div>
</div>
-{% include "shared/footer" %}
+{% include "shared/_footer.html.j2" %}
</body>
</html>
diff --git a/docs/templates/index.liquid b/docs/templates/index.html.j2
index 35986d59..4567ef55 100644
--- a/docs/templates/index.liquid
+++ b/docs/templates/index.html.j2
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
-{% include "shared/head" %}
+{% include "shared/_head.html.j2" %}
- <body id="{{slug}}">
-{% include "shared/navbar" %}
+ <body id="{{ slug }}">
+{% include "shared/_navbar.html.j2" %}
<div class="container">
<div class="row">
@@ -27,7 +27,7 @@
<li><a href="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64">Linux (64-bit)</a></li>
<li><a href="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64">OS X (64-bit)</a></li>
<li><a href="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe">Windows (64-bit)</a></li>
- <li><a href="/jq/download/">Other platforms, older versions, and source</a></li>
+ <li><a href="{{root}}/download/">Other platforms, older versions, and source</a></li>
</ul>
</div>
@@ -68,6 +68,6 @@
</div>
</div>
-{% include "shared/footer" %}
+{% include "shared/_footer.html.j2" %}
</body>
</html>
diff --git a/docs/templates/manual.liquid b/docs/templates/manual.html.j2
index f1d7985a..21f9ad28 100644
--- a/docs/templates/manual.liquid
+++ b/docs/templates/manual.html.j2
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
-{% include "shared/head" %}
+{% include "shared/_head.html.j2" %}
<body id="{{slug}}" data-spy="scroll" data-target="#navcolumn" data-offset="100">
-{% include "shared/navbar" %}
+{% include "shared/_navbar.html.j2" %}
<div class="container">
<div class="row">
@@ -32,41 +32,41 @@
{% for section in sections %}
<section id="{{section.title | section_id}}">
<h2>{{section.title}}</h2>
- {{section.body | markdownify}}
+ {{ (section.body | markdownify) if section.body }}
{% for entry in section.entries %}
<section id="{{entry.title | entry_id}}">
<h3>
- {{entry.title | markdownify | no_paragraph}}
+ {{entry.title | markdownify | no_paragraph }}
{% if entry.subtitle %}<small>{{entry.subtitle}}</small>{% endif %}
</h3>
{{entry.body | markdownify}}
{% if entry.examples %}
<div>
- {% capture exampleID %}{{ "" | unique }}{% endcapture %}
+ {% set exampleID = unique_id() %}
<a data-toggle="collapse" href="#example{{exampleID}}">
<i class="glyphicon glyphicon-chevron-right"></i>
- {% if entry.examples[1] %}Examples{%else%}Example{%endif%}
+ {% if entry.examples | length > 1 %}Examples{%else%}Example{%endif%}
</a>
<div id="example{{exampleID}}" class="manual-example collapse">
{% for example in entry.examples %}
<table>
- <tr><th></th><td class="jqprogram">jq '{{example.program | escape}}'</td></tr>
- <tr><th>Input</th><td>{{example.input | escape}}</td></tr>
- {% unless example.output[0] %}
+ <tr><th></th><td class="jqprogram">jq '{{ example.program }}'</td></tr>
+ <tr><th>Input</th><td>{{ example.input }}</td></tr>
+ {% if not example.output[0] %}
<tr>
<th>Output</th>
<td><i>none</i></td>
</tr>
- {% endunless %}
+ {% endif %}
{% for output in example.output %}
<tr>
- {% if forloop.index == 1 %}
+ {% if loop.first %}
<th>Output</th>
{% else %}
<th></th>
{% endif %}
- <td>{{output | escape}}</td>
+ <td>{{ output }}</td>
</tr>
{% endfor %}
</table>
@@ -82,15 +82,15 @@
</div>
</div>
-{% include "shared/footer" %}
+{% include "shared/_footer.html.j2" %}
<script>
var section_map = {
{% for section in sections %}
{% for entry in section.entries %}
- {{entry.title | search_id | json}} : {{entry.title | entry_id | json}},
+ {{entry.title | search_id | tojson }} : {{entry.title | entry_id | tojson }},
{% endfor %}
- {{section.title | search_id | json}} : {{section.title | section_id | json}}
- {% unless forloop.last %},{% endunless %}
+ {{section.title | search_id | tojson }} : {{section.title | section_id | tojson }}
+ {% if not loop.last %},{% endif %}
{% endfor %}
};
</script>
diff --git a/docs/templates/shared/_footer.liquid b/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 @@
<footer>
<div class="container">
- <p>This website is made with <a href="http://www.tinytree.info">Bonsai</a> and <a href="http://getbootstrap.com">Bootstrap</a>, themed with <a href="https://bootswatch.com">Bootswatch</a>.</p>
+ <p>This website is made with <a href="http://getbootstrap.com">Bootstrap</a>, themed with <a href="https://bootswatch.com">Bootswatch</a>.</p>
<p>jq is licensed under the MIT license (code) and the <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY-3.0</a> license (docs).</p>
</div>
</footer>
diff --git a/docs/templates/shared/_head.liquid b/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 @@
<title>{{headline}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <link rel="canonical" href="{{url}}{{permalink | remove:'/index'}}" />
+ <link rel="canonical" href="{{ url }}{{ permalink | replace('/index','') }}" />
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/spacelab/bootstrap.min.css" rel="stylesheet" integrity="sha256-j7Dtnd7ZjexEiPNbscbopFn9+Cs0b3TLipKsWAPHZIM= sha512-RFhfi6P8zWMAJrEGU+CPjuxPh3r/UUBGqQ+/o6WKPIVZmQqeOipGotH2ihRULuQ8wsMBoK15TSZqc/7VYWyuIw==" crossorigin="anonymous">
- <link rel="stylesheet" href="{{root}}/css/base.css" type="text/css">
+ <link rel="stylesheet" href="{{ root }}/css/base.css" type="text/css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
diff --git a/docs/templates/shared/_navbar.liquid b/docs/templates/shared/_navbar.html.j2
index d68063b4..3fa5f14c 100644
--- a/docs/templates/shared/_navbar.liquid
+++ b/docs/templates/shared/_navbar.html.j2
@@ -13,8 +13,8 @@
<div class="navbar-collapse collapse" id="nav-collapse">
<ul class="nav navbar-nav">
{% for item in navigation %}
- <li {% if item.permalink == permalink %} class="active" {% endif %}>
- <a href="{{root}}{{item.permalink}}">{{item.name}}</a>
+ <li {% if item == permalink %} class="active" {% endif %}>
+ <a href="{{root}}/{{item}}">{{item | capitalize}}</a>
</li>
{% endfor %}
<li><a href="https://github.com/stedolan/jq/issues">Issues</a></li>