A collection of related pages sharing a common path prefix can be associated together via the notion of the "Blok": a lightweight set of a handful of shared meta-data and processing properties. For example, in this site the Bloks are Basics, haXtags and X-renderers.
Bloks are identified by a name
that is exactly equivalent to the common path prefix of the related pages to be associated under this umbrella. This name must be connected to a number of properties via a *.haxproj |B|name: ..
directive, as this "live" example (for this site's Blok named basics
) easily demonstrates.
name/*.html
or name.*.html
|B|name: ..
directive)
If the above |B| directive defines a blokIndexPageFile
, then 1 additional output page will be generated for the Blok that has no direct counterpart among the project's input content sources: this can be used as an umbrella page for the Blok's pages — dressed as a table-of-contents, a section home, an "article archive", etc. Each Blok in this site has its own such auto-generated /<name>/index.html
as set in its corresponding |B| directive in default.haxproj.
During generation of that page, when the outer template invokes {P|:content:|}
tmpl/_hax_blokindex.haxsnip.html
snippet file is applied in-place by{X|_hax_blokindex: vars=[ ("bname","<blok-name>") ], content="" |}
.
tmpl/_hax_blokindex.haxsnip.html
, as a starter template by way of example,bname
d Blok's title
and desc
properties{B|title:{%bname%}|}
and {B|desc:{%bname%}|}
respectively.
For seeing how to actually generate (in this auto-generated Blok index page or elsewhere) an acceptable hyperlinked listing of some or all of the Blok-associated pages —the original default tmpl/_hax_blokindex.haxsnip.html
lacks this— it pays to inspect the project-directory from which this site was generated: specifically how a (minimally) customized tmpl/_hax_blokindex.haxsnip.html
invokes an additional (project-specific) tmpl/dox-topicitem.haxsnip.html
via a custom X-tag defined in the |X|hax.feedView:doxtopicindex:
directive (in default.haxproj). This interplay may appear slightly confusing at first during experimentation, unless and until the (ultimately trivial) rendering logic of both the hax.snippet and especially the hax.feedView X-renderers are absorbed first.