From 926db30b62cae327398e9971605051680710b21a Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Sat, 14 Dec 2019 23:30:16 +0100 Subject: Tracker. Collect issues and ideas in tracker Collect a broad series of possible improvements to Pandoc Ikiwiki plugin management of meta block attributes. The issues are best consumed via the collection page: *issues.mdwn*. Also main tracker document added. --- tracker/documentation-meta-attr.mdwn | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 tracker/documentation-meta-attr.mdwn (limited to 'tracker/documentation-meta-attr.mdwn') diff --git a/tracker/documentation-meta-attr.mdwn b/tracker/documentation-meta-attr.mdwn new file mode 100644 index 0000000..fbec9c2 --- /dev/null +++ b/tracker/documentation-meta-attr.mdwn @@ -0,0 +1,57 @@ +% Documentation of meta attribute list of hashes + +The commit "Feat. Plugin. Provide sets of meta keys for inclusion" +provide documentation included literally here. + +Add further lists of meta keys to include (*hash_meta_keys* +and *list_hash_meta_keys*), add them to the *list_meta* map in +subroutine *htmlize* and provide them to *pagestate* *meta*. + +This makes available, e.g. the *reference* attribute in page +templates. + +The commit require some explanation. + +Until now, meta attributes were available as + + * Bolean meta (*bool_meta*) + * Scalar meta (*scalar_meta*) + * List meta (*list_meta*) + +All meta attributes in documents are provided as page template +variables with a 'pandoc_'-prefix. On top of that, attributes listed +in *scalar_meta_keys* are made available as regular template +variables, without prefix. + +Lists are problematic. Pure lists are pushed with 'pandoc_' prefix, +but they can not be used. The alternative would be via loops (see +), but inside loops +one need to call for a variable and the pushed attribute does not +provide one. + +This commit properly makes available the *reference* attribute, which +is of type list of associated list. This construct actually fully +natural fulfil the limitations of lists. Template loops generate the +items, whose values are available with keys as variable names: + + --- + references: + - id: refone + title: Ref-MetaInlines-in-MetaList + - id: reftwo + title: Ref-MetaInlines-in-MetaList + ... + +Which is called like this: + + + + + + + + +How is hacky. The items in *hash_meta_keys* and *list_hash_meta_keys* +are added to *list_meta_keys* and undergo the list processing. The +list processing contradictory adopted better for *list_hash_meta_keys* +than for *list_meta_keys*. -- cgit v1.2.3