diff --git a/bin/jqt b/bin/jqt
index 2d0f88e..ce8c328 100755
--- a/bin/jqt
+++ b/bin/jqt
@@ -401,18 +401,17 @@ $endif$
# Merge document and all data
########################################################################
-declare DOCUMENT_METADATA_NAME='front' # front matter
-declare DOCUMENT_CONTENT_NAME='body' # body matter
+declare DOCUMENT_METADATA_NAME='page' # front matter and etc.
declare -A JSON_DATA=() YAML_DATA=() YAML_SNIPPETS=()
declare -A JSON_DATA_DOT=() YAML_DATA_DOT=()
# Global objects available in jq scripts:
-# .body
-# .front ...
-# .front._highlight
-# .front._id
-# .front._toc
+# .page ...
+# .page._content
+# .page._highlight
+# .page._id
+# .page._toc
# < stdin > stdout
function merge
@@ -423,10 +422,9 @@ function merge
{ # split .
echo '(. / "") as [$body, $toc, $css] |'
- # front and body
- echo "{ $DOCUMENT_CONTENT_NAME: "'$body'
- echo ", $DOCUMENT_METADATA_NAME: ("; yaml2json < $FRONT_MATTER
- echo "+ { _id: \"${DOCUMENT_ID}\","' _toc: $toc, _highlight: $css })}'
+ # page
+ echo "{ $DOCUMENT_METADATA_NAME: ("; yaml2json < $FRONT_MATTER
+ echo "+ { _id: \"${DOCUMENT_ID}\","' _content: $body, _toc: $toc, _highlight: $css })}'
# additional data
for key in "${!YAML_DATA[@]}"; do
echo "+{ $key:"
@@ -591,7 +589,7 @@ declare expand=''
declare opt key filename
-while getopts :hVD:I:P:L:i:j:45d:eprtf:n:m:M:T:CHS-: opt; do
+while getopts :hVD:I:P:L:i:j:45d:eprtn:m:M:T:CHS-: opt; do
case $opt in
# Generic options
h) help
@@ -638,10 +636,6 @@ while getopts :hVD:I:P:L:i:j:45d:eprtf:n:m:M:T:CHS-: opt; do
t) front_matter=1
;;
# Data options
- f) DOCUMENT_METADATA_NAME=$OPTARG
- ;;
- n) DOCUMENT_CONTENT_NAME=$OPTARG
- ;;
m|M)[[ $OPTARG == *:* ]] || usage "Bad format in data specification; expected 'key:filename'"
key=${OPTARG%:*} filename=${OPTARG#*:}
[[ -e $filename ]] || usage "File '$filename' does not exists"
@@ -661,6 +655,8 @@ while getopts :hVD:I:P:L:i:j:45d:eprtf:n:m:M:T:CHS-: opt; do
fi
fi
;;
+ n) DOCUMENT_METADATA_NAME=$OPTARG
+ ;;
T) if [[ -z $OPTARG ]]; then
snippets=1
elif [[ $OPTARG == '--' ]]; then
diff --git a/docs/Makefile b/docs/Makefile
index e9517fe..84f1392 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -66,7 +66,7 @@ Common := \
$(Structure)/default.html \
$(Structure)/head.html \
$(Structure)/footer.html \
- $(Content)/LINKS.MD \
+ $(Content)/LINKS.txt \
filters.jq \
macros.m \
@@ -131,8 +131,8 @@ $(Destination)/index.html: $(Content)/home.md $(Common) \
$(info ==> $@)
$(JQT) -d $< $(Structure)/default.html > $@
-$(foreach p,$(Pages),$(Destination)/$(p).html): $(Content)/FLOW.MD $(Content)/opt/*.md
-$(Destination)/index.html $(Destination)/structure.html: $(Content)/EXAMPLE.MD
+$(foreach p,$(Pages),$(Destination)/$(p).html): $(Content)/FLOW.txt $(Content)/opt/*.txt
+$(Destination)/index.html $(Destination)/structure.html: $(Content)/EXAMPLE.txt
define Target
$(Destination)/$(1).html: $(Content)/$(1).md $(Structure)/$(2).html $(Common) \
@@ -148,14 +148,14 @@ $(Destination)/jqt.css: $(Presentation)/jqt.css $(Presentation)/github.css
jqt -P CSS-min -I$(Presentation) $< > $@
# Man page
-$(ManPage): $(Content)/jqt.1.md
+$(ManPage): $(Content)/jqt.1.markdown
$(info ==> $@)
jqt -P MarkDown -I$(Content) $< \
| pandoc --standalone --from markdown --to man \
| gzip > $@
# Help text
-/tmp/help: $(Content)/help.txt
+/tmp/help: $(Content)/help.markdown
jqt -P MarkDown -I$(Content) $< \
| pandoc --from markdown --to plain - \
| sed '1,7b;/^$$/d;s/_\([A-Z]\+\)_/\1/g;/^[^A-Z]/s/^/ /' \
diff --git a/docs/content/EXAMPLE.MD b/docs/content/EXAMPLE.txt
similarity index 58%
rename from docs/content/EXAMPLE.MD
rename to docs/content/EXAMPLE.txt
index 2d0b646..01bec22 100644
--- a/docs/content/EXAMPLE.MD
+++ b/docs/content/EXAMPLE.txt
@@ -3,21 +3,21 @@
#>
```html
-
+
- {{.front.title | gsub("<[^>]*>"; "")}}
+ {{.page.title | gsub("<[^>]*>"; "")}}
{# include files in preprocessing stage #}
<%include "head.html">
"/>
{# optional line #}
-
+
{# implicit loop for all authors #}
- {% .front.author | sort[] %}
+ {% .page.author | sort[] %}
- {{.front.title}}
+ {{.page.title}}
- {{.body}}
+ {{.page._content}}
<%partial analytics 'UA-82432866-1'>
diff --git a/docs/content/FLOW.MD b/docs/content/FLOW.txt
similarity index 100%
rename from docs/content/FLOW.MD
rename to docs/content/FLOW.txt
diff --git a/docs/content/LINKS.MD b/docs/content/LINKS.txt
similarity index 100%
rename from docs/content/LINKS.MD
rename to docs/content/LINKS.txt
diff --git a/docs/content/README.txt b/docs/content/README.txt
new file mode 100644
index 0000000..8771e5d
--- /dev/null
+++ b/docs/content/README.txt
@@ -0,0 +1,26 @@
+File extension conventions
+==========================
+
+* Web site pages
+ - content.md
+ - data.md
+ - engine.md
+ - home.md
+ - structure.md
+
+* Partial MarkDown to be included
+ - EXAMPLE.txt
+ - FLOW.txt
+ - LINKS.txt
+ - opt/*.txt
+
+* MarkDown snippets
+ - snippets.yaml
+
+* Other unrelated MarkDown files
+ - help.markdown
+ - jqt.1.markdown
+
+
diff --git a/docs/content/content.md b/docs/content/content.md
index 8a85ff0..03e30d5 100644
--- a/docs/content/content.md
+++ b/docs/content/content.md
@@ -1,10 +1,9 @@
---
-<%include "config.yaml">
title: Document content
-updated: "2016-08-17T10:34:16Z"
+updated: "2016-08-28T10:27:09Z"
---
<%include "macros.m">&
-<%include "LINKS.MD">&
+<%include "LINKS.txt">&
## General operation
@@ -13,16 +12,15 @@ but before [GPP][GPP] is used to preprocess them. Pandoc's output
is then merged with the [YAML][YAML] front matter metadata and other input data before be sended
to the render stage. This is described on the middle of this diagram:
-<%include "FLOW.MD">
+<%include "FLOW.txt">
When invoking `jqt` you can use the following options to influence document
conversion:
-<%include "opt/4.md">
-<%include "opt/D.md">
-<%include "opt/d.md">
-<%include "opt/I.md">
-<%include "opt/n.md">
+<%include "opt/4.txt">
+<%include "opt/D.txt">
+<%include "opt/d.txt">
+<%include "opt/I.txt">
## File structure
@@ -32,15 +30,15 @@ Document files contain MarkDown text preceded by an optional YAML front matter.
Pandoc accepts YAML metadata intermixed with MarkDown content. _jqt_
extracts the YAML front matter, located at the very beginning of the file,
-and injects it into the render stage under a global JSON object named `.front`.
+and injects it into the render stage under a global JSON object named `.page`.
### Body
Pandoc will convert the document body to HTML,
-and _jqt_ will inject it into the render stage under a global JSON scalar named
-`.body`. If the document contains fenced code blocks specifying the language of
-the code block, the highlight code will be in the scalar `.front._css`. Also, the
-table of contents will be in the scalar `.front._toc`.
+and _jqt_ will inject it into the render stage under the global JSON scalar
+`.page._content`. If the document contains fenced code blocks specifying the language of
+the code block, the highlight code will be in the scalar `.page._css`. Also, the
+table of contents will be in the scalar `.page._toc`.
## Document syntax
@@ -89,7 +87,7 @@ Inside macro definitions argument references are prefixed by a dollar (`$1`, `$2
Predefined macros and user define macros have the same call sequence:
```
-<%include "LINKS.MD">
+<%include "LINKS.txt">
<%sc 'A title in small caps'>
```
diff --git a/docs/content/data.md b/docs/content/data.md
index ee90fa6..94a3cef 100644
--- a/docs/content/data.md
+++ b/docs/content/data.md
@@ -1,10 +1,9 @@
---
-<%include "config.yaml">
title: Data model
-updated: "2016-08-13T07:48:26Z"
+updated: "2016-08-28T10:27:09Z"
---
<%include "macros.m">&
-<%include "LINKS.MD">&
+<%include "LINKS.txt">&
## General operation
@@ -16,17 +15,17 @@ rendering the template. Also, `jqt` accepts additional data files in the command
in [YAML][YAML] or [JSON][JSON] format to be merged with
the document front matter. This is described on the bottom of this diagram:
-<%include "FLOW.MD">
+<%include "FLOW.txt">
When invoking `jqt` you can use the following options to define the additional input
data and influence JSON preprocessing:
-<%include "opt/D.md">
-<%include "opt/f.md">
-<%include "opt/I.md">
-<%include "opt/M.md">
-<%include "opt/m.md">
-<%include "opt/T.md">
+<%include "opt/D.txt">
+<%include "opt/I.txt">
+<%include "opt/M.txt">
+<%include "opt/m.txt">
+<%include "opt/n.txt">
+<%include "opt/T.txt">
## Data formats
@@ -165,9 +164,9 @@ Read the output of `yq --help` and `cq --help` for more information.
When invoking `jqt` you can use the following options to extract, remove or
test the presence of front matter data in the input document:
-<%include "opt/e.md">
-<%include "opt/r.md">
-<%include "opt/t.md">
+<%include "opt/e.txt">
+<%include "opt/r.txt">
+<%include "opt/t.txt">
<#
vim:ts=4:sw=4:ai:et:fileencoding=utf8:syntax=markdown
diff --git a/docs/content/engine.md b/docs/content/engine.md
index 7b7fa7b..ceed40c 100644
--- a/docs/content/engine.md
+++ b/docs/content/engine.md
@@ -1,10 +1,9 @@
---
-<%include "config.yaml">
title: Operating the engine
-updated: "2016-08-17T09:50:11Z"
+updated: "2016-08-28T10:27:09Z"
---
<%include "macros.m">&
-<%include "LINKS.MD">&
+<%include "LINKS.txt">&
## General operation
@@ -14,7 +13,7 @@ where HTML is mixed with [_jq_][JQ] snippets to implement the transformation log
This diagram shows how document, template and data inputs (on the left) are combined by
_jqt_ to produce the final HTML output:
-<%include "FLOW.MD">
+<%include "FLOW.txt">
The command `jqt` is a shell script executed by `bash`.
The external shell commands called by `jqt` are `cat`, `gpp`, `jq`, `mkdir`,
@@ -72,28 +71,27 @@ arguments. The usage possibilities are:
### Options
-<%include "opt/4.md">
-<%include "opt/C.md">
-<%include "opt/D.md">
-<%include "opt/d.md">
-<%include "opt/e.md">
-<%include "opt/f.md">
-<%include "opt/H.md">
-<%include "opt/h.md">
-<%include "opt/I.md">
-<%include "opt/i.md">
-<%include "opt/j.md">
-<%include "opt/L.md">
-<%include "opt/M.md">
-<%include "opt/m.md">
-<%include "opt/n.md">
-<%include "opt/P.md">
-<%include "opt/p.md">
-<%include "opt/r.md">
-<%include "opt/S.md">
-<%include "opt/T.md">
-<%include "opt/t.md">
-<%include "opt/V.md">
+<%include "opt/4.txt">
+<%include "opt/C.txt">
+<%include "opt/D.txt">
+<%include "opt/d.txt">
+<%include "opt/e.txt">
+<%include "opt/H.txt">
+<%include "opt/h.txt">
+<%include "opt/I.txt">
+<%include "opt/i.txt">
+<%include "opt/j.txt">
+<%include "opt/L.txt">
+<%include "opt/M.txt">
+<%include "opt/m.txt">
+<%include "opt/n.txt">
+<%include "opt/P.txt">
+<%include "opt/p.txt">
+<%include "opt/r.txt">
+<%include "opt/S.txt">
+<%include "opt/T.txt">
+<%include "opt/t.txt">
+<%include "opt/V.txt">
## Preprocessing
@@ -112,7 +110,7 @@ detail their usage of the preprocessor.
A different transformation can also be be considered a kind of preprocessing. The option
`-T` allows the use of YAML files for collections of MarkDown snippets:
-<%include "opt/T.md">
+<%include "opt/T.txt">
### CSS preprocessing
@@ -121,7 +119,7 @@ section because it is outside the _jqt_ normal processing work flow.
To enable CSS preprocessing the `-P` option must be used with the `css` or `css-min` options:
-<%include "opt/P.md">
+<%include "opt/P.txt">
You can minify the CSS style sheet choosing the `css-min` option.
The CSS minimization is not extremely aggressive, but is safe and sufficient.
diff --git a/docs/content/help.markdown b/docs/content/help.markdown
new file mode 100644
index 0000000..f99724d
--- /dev/null
+++ b/docs/content/help.markdown
@@ -0,0 +1,47 @@
+jqt - jq based web template engine [version <%include "../VERSION">]
+
+Usage: jqt [-h | --help | -p | -V | --version]
+ jqt [options] < infile > result\
+ jqt [options] infile > result\
+ jqt [options] infile result
+
+Preprocessor options:
+
+<%include "opt/D.txt">
+<%include "opt/I.txt">
+<%include "opt/P.txt">
+
+Template options:
+
+<%include "opt/L.txt">
+<%include "opt/i.txt">
+<%include "opt/j.txt">
+
+Document options:
+
+<%include "opt/4.txt">
+<%include "opt/d.txt">
+
+Data options:
+
+<%include "opt/M.txt">
+<%include "opt/m.txt">
+<%include "opt/T.txt">
+
+Debugging options:
+
+<%include "opt/C.txt">
+<%include "opt/H.txt">
+<%include "opt/S.txt">
+
+Information options:
+
+<%include "opt/h.txt">
+<%include "opt/p.txt">
+<%include "opt/V.txt">
+
+See the manpage for full documentation and more options.
+
+<#
+vim:ts=4:sw=4:ai:et:fileencoding=utf8:syntax=markdown
+#>
diff --git a/docs/content/help.txt b/docs/content/help.txt
deleted file mode 100644
index b7d166f..0000000
--- a/docs/content/help.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-jqt - jq based web template engine [version <%include "../VERSION">]
-
-Usage: jqt [-h | --help | -p | -V | --version]
- jqt [options] < infile > result\
- jqt [options] infile > result\
- jqt [options] infile result
-
-Preprocessor options:
-
-<%include "opt/D.md">
-<%include "opt/I.md">
-<%include "opt/P.md">
-
-Template options:
-
-<%include "opt/L.md">
-<%include "opt/i.md">
-<%include "opt/j.md">
-
-Document options:
-
-<%include "opt/4.md">
-<%include "opt/d.md">
-
-Data options:
-
-<%include "opt/M.md">
-<%include "opt/m.md">
-<%include "opt/T.md">
-
-Debugging options:
-
-<%include "opt/C.md">
-<%include "opt/H.md">
-<%include "opt/S.md">
-
-Information options:
-
-<%include "opt/h.md">
-<%include "opt/p.md">
-<%include "opt/V.md">
-
-See the manpage for full documentation and more options.
diff --git a/docs/content/home.md b/docs/content/home.md
index b90a7fd..9b8b272 100644
--- a/docs/content/home.md
+++ b/docs/content/home.md
@@ -1,9 +1,8 @@
---
-<%include "config.yaml">
-updated: "2016-08-17T09:55:33Z"
+updated: "2016-08-28T10:27:09Z"
---
<%include "macros.m">&
-<%include "LINKS.MD">&
+<%include "LINKS.txt">&
Could be [_jq_][JQ] the basis for a web template engine?
Let's explore…
@@ -49,7 +48,7 @@ script and some content and data in [JSON][JSON] format… and the magic is
And, how do the _syntactic sugar_ looks like? Do you think the following
example seems to be a template?
-<%include "EXAMPLE.MD">&
+<%include "EXAMPLE.txt">&
### Status
diff --git a/docs/content/jqt.1.md b/docs/content/jqt.1.markdown
similarity index 68%
rename from docs/content/jqt.1.md
rename to docs/content/jqt.1.markdown
index c670859..842603d 100644
--- a/docs/content/jqt.1.md
+++ b/docs/content/jqt.1.markdown
@@ -21,28 +21,27 @@ where HTML is mixed with **jq** snippets to implement the transformation logic.
# OPTIONS
-<%include "opt/4.md">
-<%include "opt/C.md">
-<%include "opt/D.md">
-<%include "opt/d.md">
-<%include "opt/e.md">
-<%include "opt/f.md">
-<%include "opt/H.md">
-<%include "opt/h.md">
-<%include "opt/I.md">
-<%include "opt/i.md">
-<%include "opt/j.md">
-<%include "opt/L.md">
-<%include "opt/M.md">
-<%include "opt/m.md">
-<%include "opt/n.md">
-<%include "opt/P.md">
-<%include "opt/p.md">
-<%include "opt/r.md">
-<%include "opt/S.md">
-<%include "opt/T.md">
-<%include "opt/t.md">
-<%include "opt/V.md">
+<%include "opt/4.txt">
+<%include "opt/C.txt">
+<%include "opt/D.txt">
+<%include "opt/d.txt">
+<%include "opt/e.txt">
+<%include "opt/H.txt">
+<%include "opt/h.txt">
+<%include "opt/I.txt">
+<%include "opt/i.txt">
+<%include "opt/j.txt">
+<%include "opt/L.txt">
+<%include "opt/M.txt">
+<%include "opt/m.txt">
+<%include "opt/n.txt">
+<%include "opt/P.txt">
+<%include "opt/p.txt">
+<%include "opt/r.txt">
+<%include "opt/S.txt">
+<%include "opt/T.txt">
+<%include "opt/t.txt">
+<%include "opt/V.txt">
# FILES
@@ -73,3 +72,7 @@ Copyright © 2015 Joan Josep Ordinas Rosa.
**gpp(1)**, **jq(1)**
**jqt** home page:
+
+
diff --git a/docs/content/opt/4.md b/docs/content/opt/4.txt
similarity index 100%
rename from docs/content/opt/4.md
rename to docs/content/opt/4.txt
diff --git a/docs/content/opt/C.md b/docs/content/opt/C.txt
similarity index 100%
rename from docs/content/opt/C.md
rename to docs/content/opt/C.txt
diff --git a/docs/content/opt/D.md b/docs/content/opt/D.txt
similarity index 100%
rename from docs/content/opt/D.md
rename to docs/content/opt/D.txt
diff --git a/docs/content/opt/H.md b/docs/content/opt/H.txt
similarity index 100%
rename from docs/content/opt/H.md
rename to docs/content/opt/H.txt
diff --git a/docs/content/opt/I.md b/docs/content/opt/I.txt
similarity index 100%
rename from docs/content/opt/I.md
rename to docs/content/opt/I.txt
diff --git a/docs/content/opt/L.md b/docs/content/opt/L.txt
similarity index 100%
rename from docs/content/opt/L.md
rename to docs/content/opt/L.txt
diff --git a/docs/content/opt/M.md b/docs/content/opt/M.txt
similarity index 100%
rename from docs/content/opt/M.md
rename to docs/content/opt/M.txt
diff --git a/docs/content/opt/P.md b/docs/content/opt/P.txt
similarity index 100%
rename from docs/content/opt/P.md
rename to docs/content/opt/P.txt
diff --git a/docs/content/opt/S.md b/docs/content/opt/S.txt
similarity index 100%
rename from docs/content/opt/S.md
rename to docs/content/opt/S.txt
diff --git a/docs/content/opt/T.md b/docs/content/opt/T.txt
similarity index 100%
rename from docs/content/opt/T.md
rename to docs/content/opt/T.txt
diff --git a/docs/content/opt/V.md b/docs/content/opt/V.txt
similarity index 100%
rename from docs/content/opt/V.md
rename to docs/content/opt/V.txt
diff --git a/docs/content/opt/d.md b/docs/content/opt/d.txt
similarity index 100%
rename from docs/content/opt/d.md
rename to docs/content/opt/d.txt
diff --git a/docs/content/opt/e.md b/docs/content/opt/e.txt
similarity index 100%
rename from docs/content/opt/e.md
rename to docs/content/opt/e.txt
diff --git a/docs/content/opt/h.md b/docs/content/opt/h.txt
similarity index 100%
rename from docs/content/opt/h.md
rename to docs/content/opt/h.txt
diff --git a/docs/content/opt/i.md b/docs/content/opt/i.txt
similarity index 100%
rename from docs/content/opt/i.md
rename to docs/content/opt/i.txt
diff --git a/docs/content/opt/j.md b/docs/content/opt/j.txt
similarity index 100%
rename from docs/content/opt/j.md
rename to docs/content/opt/j.txt
diff --git a/docs/content/opt/m.md b/docs/content/opt/m.txt
similarity index 100%
rename from docs/content/opt/m.md
rename to docs/content/opt/m.txt
diff --git a/docs/content/opt/n.md b/docs/content/opt/n.md
deleted file mode 100644
index 90247fb..0000000
--- a/docs/content/opt/n.md
+++ /dev/null
@@ -1,6 +0,0 @@
--n NAME
-: Define the name for converted document in _jq_ scripts (defaults to `body`).
-
-<#
-vim:ts=4:sw=4:ai:et:fileencoding=utf8:syntax=markdown
-#>
diff --git a/docs/content/opt/f.md b/docs/content/opt/n.txt
similarity index 80%
rename from docs/content/opt/f.md
rename to docs/content/opt/n.txt
index 7b3524d..6177c78 100644
--- a/docs/content/opt/f.md
+++ b/docs/content/opt/n.txt
@@ -1,5 +1,5 @@
--f NAME
-: Define the name for YAML document metadata in _jq_ scripts (defaults to `front`).
+-n NAME
+: Define the name for YAML document metadata in _jq_ scripts (defaults to `page`).
<#
vim:ts=4:sw=4:ai:et:fileencoding=utf8:syntax=markdown
diff --git a/docs/content/opt/p.md b/docs/content/opt/p.txt
similarity index 100%
rename from docs/content/opt/p.md
rename to docs/content/opt/p.txt
diff --git a/docs/content/opt/r.md b/docs/content/opt/r.txt
similarity index 100%
rename from docs/content/opt/r.md
rename to docs/content/opt/r.txt
diff --git a/docs/content/opt/t.md b/docs/content/opt/t.txt
similarity index 100%
rename from docs/content/opt/t.md
rename to docs/content/opt/t.txt
diff --git a/docs/content/structure.md b/docs/content/structure.md
index 3d2fa36..4959daa 100644
--- a/docs/content/structure.md
+++ b/docs/content/structure.md
@@ -1,10 +1,9 @@
---
-<%include "config.yaml">
title: Document structure
-updated: "2016-08-13T07:48:26Z"
+updated: "2016-08-28T10:27:09Z"
---
<%include "macros.m">&
-<%include "LINKS.MD">&
+<%include "LINKS.txt">&
## General operation
@@ -16,16 +15,16 @@ with the document and data inputs in the render stage to produce the
final HTML document.
This is described on the top of this diagram:
-<%include "FLOW.MD">
+<%include "FLOW.txt">
When invoking `jqt` you can use the following options to modify template
rendering:
-<%include "opt/D.md">
-<%include "opt/I.md">
-<%include "opt/i.md">
-<%include "opt/j.md">
-<%include "opt/L.md">
+<%include "opt/D.txt">
+<%include "opt/I.txt">
+<%include "opt/i.txt">
+<%include "opt/j.txt">
+<%include "opt/L.txt">
## Template syntax
@@ -35,7 +34,7 @@ values when a template is rendered and actions (delimited by `{%` and
template. Comments (delimited by `{#` and `#}`) are ignored and not copied to the output.
This is a complete template example:
-<%include "EXAMPLE.MD">&
+<%include "EXAMPLE.txt">&
### Preprocessing
@@ -93,7 +92,7 @@ you must put this conditional macro call:
```
<%ifndef HEAD_TITLE>
- {{.front.title}} {# default block #}
+ {{.page.title}} {# default block #}
<%else><%call HEAD_TITLE><%endif>
```
@@ -101,7 +100,7 @@ And in the derived template you define a macro for the desired block, and includ
```
<%define HEAD_TITLE
- {{.front.title}} – {{.site.title}}
+ {{.page.title}} – {{.site.title}}
>
<%include "default.html">
```
diff --git a/docs/presentation/jqt.css b/docs/presentation/jqt.css
index 4b69ce4..958a3e2 100644
--- a/docs/presentation/jqt.css
+++ b/docs/presentation/jqt.css
@@ -89,6 +89,13 @@
margin: 0;
}
+//
+.footnotes p {
+ margin: 0;
+ padding: 0;
+}
+
+
//
// Footer
//
diff --git a/docs/structure/default.html b/docs/structure/default.html
index ae19e06..b1df4e2 100644
--- a/docs/structure/default.html
+++ b/docs/structure/default.html
@@ -1,10 +1,10 @@
<# Default layout #>
<%include "macros.m">&
-
+
<%ifndef HEAD_TITLE>&
- {{.front.title}}
+ {{.page.title//.site.title}}
<%else><%call HEAD_TITLE><%endif>&
<%include "head.html">&
@@ -12,9 +12,8 @@
<%ifndef BODY_TITLE>&
@@ -24,7 +23,7 @@ {{.snippets.title}}
<%ifndef BODY_BLOCK>&
- {{.body}}
+ {{.page._content}}
<%else><%call BODY_BLOCK><%endif>&
diff --git a/docs/structure/head.html b/docs/structure/head.html
index 3078095..39b637b 100644
--- a/docs/structure/head.html
+++ b/docs/structure/head.html
@@ -5,15 +5,15 @@
<# <%include...> is relative to the site source #>
"/>
-
-
-
-
+
+
+
+
<#
# CSS styles
#>
-{{.front._highlight}}
+{{.page._highlight}}
<#
vim:ts=2:sw=2:ai:et:fileencoding=utf8:syntax=html
#>
diff --git a/docs/structure/page.html b/docs/structure/page.html
index 8a9fbdb..14a40c6 100644
--- a/docs/structure/page.html
+++ b/docs/structure/page.html
@@ -6,24 +6,24 @@
<# Table of contents #>
{{.snippets."toc-title"}}
- {{.front._toc}}
+ {{.page._toc}}
<# Document body #>
- {{.body}}
+ {{.page._content}}
>&
<#
# Title in HTML head element
#>
<%define HEAD_TITLE
- {{.front.title}} – {{.site.title}}
+ {{.page.title}} – {{.site.title}}
>&
<#
# Title in HTML body element
#>
<%define BODY_TITLE
- {{.front.title}} – {{.snippets.title}}
+ {{.page.title}} – {{.snippets.title}}
>&
<#
# Inherit default layout