diff --git a/docs/Rakefile b/docs/Rakefile index 8fba5a96..b204dfa9 100644 --- a/docs/Rakefile +++ b/docs/Rakefile @@ -16,6 +16,10 @@ module ExtraFilters input.gsub(/[^a-zA-Z0-9_]/,"") end + def no_paragraph(input) + input.gsub('

', '').gsub('

', '') + end + def json(input) input.to_json end diff --git a/docs/templates/index.liquid b/docs/templates/index.liquid index 69aa6e34..18453d30 100644 --- a/docs/templates/index.liquid +++ b/docs/templates/index.liquid @@ -10,7 +10,7 @@
- jq logo
diff --git a/docs/templates/manual.liquid b/docs/templates/manual.liquid index c34aa21c..d464b801 100644 --- a/docs/templates/manual.liquid +++ b/docs/templates/manual.liquid @@ -34,49 +34,47 @@

{{section.title}}

{{section.body | markdownify}} {% for entry in section.entries %} -
-

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

- {{entry.body | markdownify}} +
+

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

+ {{entry.body | markdownify}} - {% if entry.examples %} -
- {% capture exampleID %}{{ "" | unique }}{% endcapture %} - - - {% if entry.examples[1] %}Examples{%else%}Example{%endif%} - -
- - {% for example in entry.examples %} - - - - {% unless example.output[0] %} - - - - - {% endunless %} - {% for output in example.output %} - - {% if forloop.index == 1 %} - - {% else %} - - {% endif %} - - + {% if entry.examples %} +
+ {% capture exampleID %}{{ "" | unique }}{% endcapture %} + + + {% if entry.examples[1] %}Examples{%else%}Example{%endif%} + +
+ {% for example in entry.examples %} +
jq '{{example.program | escape}}'
Input{{example.input | escape}}
Outputnone
Output{{output | escape}}
+ + + {% unless example.output[0] %} + + + + + {% endunless %} + {% for output in example.output %} + + {% if forloop.index == 1 %} + + {% else %} + + {% endif %} + + + {% endfor %} +
jq '{{example.program | escape}}'
Input{{example.input | escape}}
Outputnone
Output{{output | escape}}
{% endfor %} - - - {% endfor %} +
-
- {% endif %} - + {% endif %} + {% endfor %} {% endfor %} diff --git a/docs/templates/shared/_header.liquid b/docs/templates/shared/_header.liquid index 01e8b30a..6ba8536e 100644 --- a/docs/templates/shared/_header.liquid +++ b/docs/templates/shared/_header.liquid @@ -1,7 +1,7 @@ -