X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=asciidoc-pve.in;h=878fe51772ce82481fa2fbe465046def340e624b;hp=5ad2a715d190ff87ce34383edadd67b30f27ef9a;hb=d77477d76a078937ed6b5f59845dec1fc1398110;hpb=636ea67ba597a9533a46d190248f4f066d568a22 diff --git a/asciidoc-pve.in b/asciidoc-pve.in index 5ad2a71..878fe51 100644 --- a/asciidoc-pve.in +++ b/asciidoc-pve.in @@ -6,6 +6,7 @@ use Getopt::Long; use File::Path; use File::Basename; use IO::File; +use Cwd; use JSON; @@ -372,10 +373,20 @@ sub compile_asciidoc { $attributes->{icons} = undef; $attributes->{'data-uri'} = undef; - my $cmd = ['asciidoc', '-b', 'html5']; + my $cmd = ['asciidoc']; - push @$cmd, '-s' if ($env eq 'wiki') || - (($env eq 'manvolnum') && ($man_target eq 'wiki')); + if (($env eq 'wiki') || + (($env eq 'manvolnum') && ($man_target eq 'wiki'))) { + + push @$cmd, '-s'; + + if (-f "./asciidoc/mediawiki.conf") { + my $cwd = getcwd(); + push @$cmd, '-b', "$cwd/asciidoc/mediawiki"; + } else { + push @$cmd, '-b', "mediawiki"; + } + } foreach my $key (keys %$attributes) { my $value = $attributes->{$key};