1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
<!-- -*- mode: markdown -*- -->
Somwhere thers a transition pandoc meta -> general meta, for some meta
# Pagestate data
This is for *arg-for-fripost*
* 002 1 early
* Meta according to wiki tags: title, titlesort
* No tags seen at all
* 002 4 return
* most 'pandoc_*' available
* meta 'tag' and 'pandoc_tag' set according to pandoc meta
* meta 'abstract' and 'pandoc_abstract' empty
* meta 'num_authors' is 2, 'author' content as string,
'pandoc_author' content as list
* 007 1 early
* Meta overwritten according to wiki tags: title, titlesort, author, etc
* Otherwise unchanged from 002 4
* 007 4 return
* Back to 002 4
* 013 1 early
* Back to 007 1
* 013 4--027 4 continues
# Working template variables
The sytanx is e.g. `<TMPL_VAR TITLE>`. Compare template
*nonempty.tmpl* with resulting HTML:
* TITLE -- pandoc meta
* DATE -- fallback to default `<TMPL_VAR DATE DEFAULT="1970-01-01">`
* TITLESORT -- nothing
* AUTHOR -- pandoc meta, 002 4, content as string
* ABSTRACT -- noting
* PANDOC_DATE -- pandoc meta
* PANDOC_PRIMARY_AUTHOR -- pandoc meta
* NUM_AUTHORS -- nothing
* TAG -- nothing
* PANDOC_TAG -- pandoc meta
* PANDOC_TITLESORT -- pandoc meta
* PANDOC_ABSTRACT -- nothing
* PANDOC_TITLE -- pandoc meta
* tags again with loop: ikiwiki meta
tags again with loop:
```
<TMPL_IF TAGS>
|
<TMPL_LOOP TAGS>
<TMPL_VAR LINK>|
</TMPL_LOOP>
</TMPL_IF>
<BR/>
```
# Page template data
This is for *arg-for-fripost*
* identifies
There is a need to also put things in subroutine *pagetemplate* to make
them available as variables:
```
foreach my $k (keys %{$pagestate{$page}{meta}}) {
next unless $k =~ /^(pandoc_|fripost_)/;
$template->param($k => $pagestate{$page}{meta}{$k});
}
$template->param('date' => $pagestate{$page}{meta}{date});
```
# Between title and sort in htmlize
Author fields filled forcefully. Title fields not.
# Structure of various meta variables
It is clear that scalar (*MetaInline*) are added and some list
elements (*MetaList*). Most list, plain, and maps are not. Read code
around "Try to add other keys as scalars, with pandoc_ prefix only."
Inspect *content look for type (`t`) of meta block elements.
*MetaInlines*
:
```
title: Argumentera för Fripost
```
*MetaList* with 2 x *MetaInlines*
:
```
author:
- Fripost genom arrangörer
- Fler
```
*MetaBlocks* with one *Plain*
:
```
abstract: >
gräv ner dig
du glade
```
*MetaBlocks* with one *Plain*
:
```
fripost_debug_inner: |
tillagd i dokument arg-for-fripost
```
*MetaMap* with keys pointing at *MetaInlines*
:
```
experiment:
key_first: Värde
key_second: värde
```
*MetaList* with 2 x *MetaMap* with keys pointing to *MetaInlines*
:
```
references:
- id: refone
title: Ref-MetaInlines-in-MetaList
- id: reftwo
title: Ref-MetaInlines-in-MetaList
```
|