diff options
author | Gustav Eek <gustav.eek@fripost.org> | 2019-12-14 16:13:55 +0100 |
---|---|---|
committer | Gustav Eek <gustav.eek@fripost.org> | 2020-01-06 16:25:10 +0100 |
commit | 5dcfb79dd6b229411d4ef35ff88cb898bf412c3f (patch) | |
tree | 867d60ace0337f0747e3564e23aca5961fe6ccff | |
parent | aa735c9cfd42ef9f0db515cefdf3e147f5f76e2d (diff) |
Feature. Plugin. Push listed meta variables to template.
In function *pagetemplate*, template variables are added as pandas_*
variables. This fix provides also those listed as scalar and list meta
keys without the Pandoc prefix.
-rwxr-xr-x | .ikiwiki/IkiWiki/Plugin/pandoc.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.ikiwiki/IkiWiki/Plugin/pandoc.pm b/.ikiwiki/IkiWiki/Plugin/pandoc.pm index 005f9f8..7551215 100755 --- a/.ikiwiki/IkiWiki/Plugin/pandoc.pm +++ b/.ikiwiki/IkiWiki/Plugin/pandoc.pm @@ -751,10 +751,11 @@ sub pagetemplate (@) { # END foreach my $k (keys %{$pagestate{$page}{meta}}) { - next unless $k =~ /^(pandoc_|fripost_)/; + next unless + (grep {/^$k$/} (@scalar_meta_keys, @list_meta_keys)) || + ($k =~ /^(pandoc_)/); $template->param($k => $pagestate{$page}{meta}{$k}); } - $template->param('date' => $pagestate{$page}{meta}{date}); # DEBUG Print pagetemplate data my $fnm_pfx = debug_get_filename_prefix ("pagetemplate", $page); |