summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@fripost.org>2019-12-15 01:18:35 +0100
committerGustav Eek <gustav.eek@fripost.org>2020-01-06 16:25:39 +0100
commit30335ce9e6b343543dfa9f70924d608c036173bb (patch)
tree7fe28bb9d8f11b5a73ce2c3d3a50044299a44cb0
parent33e0ebdbed22c6a9c959b580de16ffda9cebd2b4 (diff)
Notes. More notes on the tag issue.
Provide some more information and notes on tags. Not so positive, though. See *notes* and *tracker/meta-tags.mdwn*.
-rw-r--r--notes14
-rw-r--r--tracker/meta-tags.mdwn39
2 files changed, 53 insertions, 0 deletions
diff --git a/notes b/notes
index b72461f..2e83b6f 100644
--- a/notes
+++ b/notes
@@ -77,6 +77,20 @@ foreach my $k (keys %{$pagestate{$page}{meta}}) {
$template->param('date' => $pagestate{$page}{meta}{date});
```
+Things that comes populated in page template data (*pagetemplate*)
+that are not available in page state data (*htmlize*) include the
+following:
+
+ * tags
+ * parent links
+
+Parent links as `$template->{param_map}->{parentlinks}` (loopable) and
+`$template->{param_map}->{has_parentlinks}` (variable bolean). The
+loop scope makes *page* and *url* available.
+
+Tags as `$template->{param_map}->{tags}` (loopable). The loop scope
+makes *link* available.
+
# Between title and sort in htmlize
Author fields filled forcefully. Title fields not.
diff --git a/tracker/meta-tags.mdwn b/tracker/meta-tags.mdwn
index e5be776..4ff83dc 100644
--- a/tracker/meta-tags.mdwn
+++ b/tracker/meta-tags.mdwn
@@ -2,3 +2,42 @@
This is the difficultmost. Collect YAML meta block *tag* and *tags*
fields (as scalars or lists) and amend to the mainline tag work.
+
+## Info
+
+Tags and labels are used to for many things, such as filtering for
+inline. The [tag directive][drtv:tag] is standard usage. Maintenance
+is through [tag plugin][pln:tag].
+
+[drtv:tag]: https://ikiwiki.info/ikiwiki/directive/tag/
+[pln:tag]: https://ikiwiki.info/ikiwiki/plugins/tag/
+
+## Progression notes
+
+Questions, which is execution order? If parsing with *htmlize* happens
+before, that should be a good start.
+
+Possible places for source code: */IkiWiki/Plugin/tag.pm*. After
+copying to local dir, and adding some debug code, this is snippet of
+output:
+
+
+```
+D: tag:import: Run.
+D: pandoc:import: Run.
+D: tag:getopt: Run.
+D: tag:checkconfig: Run.
+D: tag:preprocess_tag: Run for test, test and 0.
+D: tag:preprocess_tag: Run for test, test and 0.
+D: IkiWiki.pm:htmlize: Run for test, HASH(0x563f41723878),
+D: pandoc:htmlize: Run for test
+D: pandoc:htmlize: Pandoc command: pandoc -f markdown -t json --email-obfuscation=none
+D: pandoc:htmlize: Pandoc command: pandoc -f json -thtml5 --email-obfuscation=none--filter=pandoc-citeproc
+D: pandoc:htmlize: Return.
+D: pandoc:pageactions: Run for test
+D: tag:pagetemplate: Run for test, test, page.
+D: pandoc:pagetemplate: Run for test and page
+```
+
+Thus it seems tag plugin gets all the execution before Pandoc plugin,
+for pulling all tag related info. This will be a hard one to break.