mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-05-02 21:55:26 +00: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::Path;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use IO::File;
|
use IO::File;
|
||||||
|
use Cwd;
|
||||||
|
|
||||||
use JSON;
|
use JSON;
|
||||||
|
|
||||||
@ -372,10 +373,20 @@ sub compile_asciidoc {
|
|||||||
$attributes->{icons} = undef;
|
$attributes->{icons} = undef;
|
||||||
$attributes->{'data-uri'} = undef;
|
$attributes->{'data-uri'} = undef;
|
||||||
|
|
||||||
my $cmd = ['asciidoc', '-b', 'html5'];
|
my $cmd = ['asciidoc'];
|
||||||
|
|
||||||
push @$cmd, '-s' if ($env eq 'wiki') ||
|
if (($env eq 'wiki') ||
|
||||||
(($env eq 'manvolnum') && ($man_target 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) {
|
foreach my $key (keys %$attributes) {
|
||||||
my $value = $attributes->{$key};
|
my $value = $attributes->{$key};
|
||||||
|
Loading…
Reference in New Issue
Block a user