mirror of
git://git.proxmox.com/git/pve-docs.git
synced 2025-03-24 06:50:10 +03:00
asciidoc-pve.in: use new mediawiki.conf to render wiki pages
This commit is contained in:
parent
636ea67ba5
commit
d77477d76a
@ -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};
|
||||
|
Loading…
x
Reference in New Issue
Block a user