]> git.proxmox.com Git - pve-docs.git/blobdiff - debian/tree/pve-docs-mediawiki/README
mediawiki: add a bit to README
[pve-docs.git] / debian / tree / pve-docs-mediawiki / README
index c065cfea18c65b2baf3150ac3f517891b3988495..38bfee270448fd365b2b15c281af7e8d968e137c 100644 (file)
@@ -21,4 +21,15 @@ mediawiki and updates predefined pages with content from this package:
 Authentification credientials are read from '/root/.pve-docs'.
 The format is 'username:password'.
 
+In the MediaWiki settings PHP file ('/var/www/mediawiki/LocalSettings.php') add:
+
+# ----8<----
+# for docs-inclusion plugin:
 require_once("/usr/lib/pve-docs/pvedocs-include.php");
+
+# for the JS snippet which generates the Table of Content and footer links
+$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, Skin &$skin ) {
+    $asciidoc_js = file_get_contents("/usr/share/doc/pve-docs-mediawiki/mediawiki-asciidoc.js");
+    $out->addInlineScript($asciidoc_js);
+};
+# ---->8----