mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-04-28 17:49:53 +00:00
mediawiki: load JS helper in plugin instead of including it in the html out
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
51b093821f
commit
d2a0a9cc74
@ -540,10 +540,6 @@ bodydata=<td class="tableblock halign-{colalign=left}">|</td>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
[header]
|
[header]
|
||||||
<!-- asciidoc HEADER -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
include1::mediawiki-asciidoc.js[]
|
|
||||||
</script>
|
|
||||||
template::[toc]
|
template::[toc]
|
||||||
<div id="asciidoccontent">
|
<div id="asciidoccontent">
|
||||||
<style type="text/css" scoped>
|
<style type="text/css" scoped>
|
||||||
|
@ -34,7 +34,10 @@ class PVEDocs {
|
|||||||
die("no such manual page");
|
die("no such manual page");
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = file_get_contents("/usr/share/pve-docs/$doc");
|
// load JS helper for TOC/footnote generation and load actual HTML content fom docs
|
||||||
|
$content = "\n<script type=\"text/javascript\">\n".file_get_contents("/usr/lib/pve-docs/PVEDocs/mw-asciidoc.js") ."</script>";
|
||||||
|
|
||||||
|
$content .= file_get_contents("/usr/share/pve-docs/$doc");
|
||||||
|
|
||||||
// from https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/HTMLets/+/11e5ef1ea2820319458dc67174ca76d6e00b10cc/HTMLets.php#140
|
// from https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/HTMLets/+/11e5ef1ea2820319458dc67174ca76d6e00b10cc/HTMLets.php#140
|
||||||
$output = '<!--- @PVEDOCS_BASE64@ '.base64_encode($content).' @PVEDOCS_BASE64@ -->';
|
$output = '<!--- @PVEDOCS_BASE64@ '.base64_encode($content).' @PVEDOCS_BASE64@ -->';
|
||||||
|
Loading…
Reference in New Issue
Block a user