docs: page.xsl: Convert repository edit URI into a parameter

Allow other sub-projects using the XSL template without modification.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2025-11-24 16:40:24 +01:00
parent 361106506b
commit eadbb34a8f
9 changed files with 11 additions and 2 deletions
+1
View File
@@ -35,6 +35,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+1
View File
@@ -103,6 +103,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+1
View File
@@ -44,6 +44,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+1
View File
@@ -55,6 +55,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+1
View File
@@ -64,6 +64,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+1
View File
@@ -154,6 +154,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+1
View File
@@ -303,6 +303,7 @@ foreach data : html_xslt_gen
'--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'link_href_base', data.get('href_base', ''),
'--stringparam', 'asset_href_base', data.get('href_base', ''),
'--stringparam', 'edit_href_base', 'https://gitlab.com/libvirt/libvirt/-/blob/master/',
'--nonet',
site_xsl,
'@INPUT@',
+3 -2
View File
@@ -19,6 +19,7 @@
<xsl:param name="timestamp"/>
<xsl:param name="link_href_base"/>
<xsl:param name="asset_href_base"/>
<xsl:param name="edit_href_base"/>
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;
</xsl:text>
<html lang="en" data-sourcedoc="{$pagesrc}">
@@ -105,11 +106,11 @@
<li><a href="https://serverfault.com/questions/tagged/libvirt">serverfault</a></li>
</ul>
</div>
<xsl:if test="$pagesrc != ''">
<xsl:if test="$pagesrc != '' and $edit_href_base != ''">
<div id="contribute">
<h3>Contribute</h3>
<ul>
<li><a href="https://gitlab.com/libvirt/libvirt/-/blob/master/{$pagesrc}">edit this page</a></li>
<li><a href="{$edit_href_base}{$pagesrc}">edit this page</a></li>
</ul>
</div>
</xsl:if>
+1
View File
@@ -30,6 +30,7 @@
<xsl:with-param name="timestamp" select="$timestamp"/>
<xsl:with-param name="link_href_base" select="$link_href_base"/>
<xsl:with-param name="asset_href_base" select="$asset_href_base"/>
<xsl:with-param name="edit_href_base" select="$edit_href_base"/>
</xsl:apply-templates>
</xsl:template>