summaryrefslogtreecommitdiffstats
path: root/.ikiwiki/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to '.ikiwiki/IkiWiki/Plugin')
-rwxr-xr-x.ikiwiki/IkiWiki/Plugin/pandoc.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/.ikiwiki/IkiWiki/Plugin/pandoc.pm b/.ikiwiki/IkiWiki/Plugin/pandoc.pm
index 7551215..adff519 100755
--- a/.ikiwiki/IkiWiki/Plugin/pandoc.pm
+++ b/.ikiwiki/IkiWiki/Plugin/pandoc.pm
@@ -42,6 +42,12 @@ my @list_meta_keys = qw/
author
/;
+my @hash_meta_keys = qw/
+ experiment
+ /;
+
+my @list_hash_meta_keys = qw/
+ references
/;
sub debug_get_filename_prefix {
@@ -564,7 +570,8 @@ sub htmlize ($@) {
$scalar_meta{$_.'_template'} = undef for @format_keys;
my %bool_meta = map { ("generate_$_"=>0) } keys %extra_formats;
- my %list_meta = map { ($_=>[]) } @list_meta_keys;
+ my %list_meta = map { ($_=>[]) } (
+ @list_meta_keys, @list_hash_meta_keys, @hash_meta_keys);
$list_meta{$_.'_extra_options'} = [] for @format_keys;
my $have_bibl = 0;
@@ -594,6 +601,7 @@ sub htmlize ($@) {
$list_meta{$k} = unwrap_c($meta->{$k});
$list_meta{$k} = [$list_meta{$k}] unless ref $list_meta{$k} eq 'ARRAY';
$have_bibl = 1 if $k eq 'references';
+ $pagestate{$page}{meta}{$k} = $list_meta{$k};
$pagestate{$page}{meta}{"pandoc_$k"} = $list_meta{$k};
}
# Try to add other keys as scalars, with pandoc_ prefix only.
@@ -752,7 +760,9 @@ sub pagetemplate (@) {
foreach my $k (keys %{$pagestate{$page}{meta}}) {
next unless
- (grep {/^$k$/} (@scalar_meta_keys, @list_meta_keys)) ||
+ (grep {/^$k$/} (
+ @scalar_meta_keys, @list_meta_keys,
+ @hash_meta_keys, @list_hash_meta_keys)) ||
($k =~ /^(pandoc_)/);
$template->param($k => $pagestate{$page}{meta}{$k});
}