From 68534afeffad17c37337cb350fd10998da973def Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Mon, 9 Dec 2019 19:51:03 +0100 Subject: Further debug work with quite some progress Read the last line in *notes*. Document *notes* added with some notes. Files *nonempty.tmpl* and *arg-for-fripost.mdwn* are uppdated with more template variable things. In *pandoc.pm*: * Debug dumps from subroutine *pagetemplate* improved * Some extra meta things are tried out --- notes | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 notes (limited to 'notes') diff --git a/notes b/notes new file mode 100644 index 0000000..49f2edd --- /dev/null +++ b/notes @@ -0,0 +1,78 @@ + + +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_author' is 2, 'author' content as string, + 'pandoc_author' content as list + +* 007 1 early + * Meta overwritten according to wiki tags: title, titlesort + * 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. ``. Compare template +*nonempty.tmpl* with resulting HTML: + + * TITLE -- pandoc meta + * DATE -- fallback to default `` + * 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: + +``` + + | + + | + + +
+``` +# 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}); +``` -- cgit v1.2.3