mirror of
git://git.proxmox.com/git/pve-docs.git
synced 2025-03-19 18:50:06 +03: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
fe97856a2a
commit
3b1b5cbd86
@ -540,10 +540,6 @@ bodydata=<td class="tableblock halign-{colalign=left}">|</td>
|
||||
</div>
|
||||
|
||||
[header]
|
||||
<!-- asciidoc HEADER -->
|
||||
<script type="text/javascript">
|
||||
include1::mediawiki-asciidoc.js[]
|
||||
</script>
|
||||
template::[toc]
|
||||
<div id="asciidoccontent">
|
||||
<style type="text/css" scoped>
|
||||
|
@ -34,7 +34,10 @@ class PVEDocs {
|
||||
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
|
||||
$output = '<!--- @PVEDOCS_BASE64@ '.base64_encode($content).' @PVEDOCS_BASE64@ -->';
|
||||
|
Loading…
x
Reference in New Issue
Block a user