To allow reuse of this template as-is in libvirt-wiki, we need to be
able to specify a distinct asset_href_base and link_href_base. Adjust
the template to allow that.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
docs/newapi.xsl | 3 ++-
docs/page.xsl | 21 +++++++++++----------
docs/site.xsl | 3 ++-
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/docs/newapi.xsl b/docs/newapi.xsl
index ebe7fdedd7..d6f8d88170 100644
--- a/docs/newapi.xsl
+++ b/docs/newapi.xsl
@@ -815,7 +815,8 @@
encoding="UTF-8">
<xsl:apply-templates select="exsl:node-set($subpage)" mode="page">
<xsl:with-param name="timestamp" select="$timestamp"/>
- <xsl:with-param name="href_base" select="$href_base"/>
+ <xsl:with-param name="link_href_base" select="$href_base"/>
+ <xsl:with-param name="asset_href_base" select="$href_base"/>
</xsl:apply-templates>
</xsl:document>
</xsl:for-each>
diff --git a/docs/page.xsl b/docs/page.xsl
index 5d55fac43f..a51587db6c 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -17,7 +17,8 @@
<xsl:template match="/" mode="page">
<xsl:param name="pagesrc"/>
<xsl:param name="timestamp"/>
- <xsl:param name="href_base"/>
+ <xsl:param name="link_href_base"/>
+ <xsl:param name="asset_href_base"/>
<xsl:text disable-output-escaping="yes"><!DOCTYPE html>
</xsl:text>
<html data-sourcedoc="{$pagesrc}">
@@ -31,7 +32,7 @@
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
- <link rel="stylesheet" type="text/css" href="{$href_base}css/main.css"/>
+ <link rel="stylesheet" type="text/css" href="{$asset_href_base}css/main.css"/>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
@@ -43,7 +44,7 @@
<meta name="go-import" content="{/html:html/html:head/html:meta[@name='go-import']/@content}"/>
</xsl:if>
- <script type="text/javascript" src="{$href_base}js/main.js">
+ <script type="text/javascript" src="{$asset_href_base}js/main.js">
<xsl:comment>// forces non-empty element</xsl:comment>
</script>
</head>
@@ -62,13 +63,13 @@
</div>
<div id="nav">
<div id="home">
- <a href="{$href_base}index.html">Home</a>
+ <a href="{$link_href_base}index.html">Home</a>
</div>
<div id="jumplinks">
<ul>
- <li><a href="{$href_base}downloads.html">Download</a></li>
- <li><a href="{$href_base}contribute.html">Contribute</a></li>
- <li><a href="{$href_base}docs.html">Docs</a></li>
+ <li><a href="{$link_href_base}downloads.html">Download</a></li>
+ <li><a href="{$link_href_base}contribute.html">Contribute</a></li>
+ <li><a href="{$link_href_base}docs.html">Docs</a></li>
</ul>
</div>
<div id="search">
@@ -91,8 +92,8 @@
<div id="contact">
<h3>Contact</h3>
<ul>
- <li><a href="{$href_base}contact.html#mailing-lists">email</a></li>
- <li><a href="{$href_base}contact.html#irc">irc</a></li>
+ <li><a href="{$link_href_base}contact.html#mailing-lists">email</a></li>
+ <li><a href="{$link_href_base}contact.html#irc">irc</a></li>
</ul>
</div>
<div id="community">
@@ -112,7 +113,7 @@
</div>
</xsl:if>
<div id="conduct">
- Participants in the libvirt project agree to abide by <a href="{$href_base}governance.html#code-of-conduct">the project code of conduct</a>
+ Participants in the libvirt project agree to abide by <a href="{$link_href_base}governance.html#code-of-conduct">the project code of conduct</a>
</div>
<br class="clear"/>
</div>
diff --git a/docs/site.xsl b/docs/site.xsl
index 0c11619fea..c0b56be72f 100644
--- a/docs/site.xsl
+++ b/docs/site.xsl
@@ -31,7 +31,8 @@
<xsl:apply-templates select="." mode="page">
<xsl:with-param name="pagesrc" select="$pagesrc"/>
<xsl:with-param name="timestamp" select="$timestamp"/>
- <xsl:with-param name="href_base" select="$href_base"/>
+ <xsl:with-param name="link_href_base" select="$href_base"/>
+ <xsl:with-param name="asset_href_base" select="$href_base"/>
</xsl:apply-templates>
</xsl:template>
--
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org