]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: page.xsl: Convert repository edit URI into a parameter
authorPeter Krempa <pkrempa@redhat.com>
Sun, 23 Nov 2025 15:48:30 +0000 (16:48 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 24 Nov 2025 15:40:24 +0000 (16:40 +0100)
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>
docs/go/meson.build
docs/html/meson.build
docs/kbase/internals/meson.build
docs/kbase/meson.build
docs/logos/meson.build
docs/manpages/meson.build
docs/meson.build
docs/page.xsl
docs/site.xsl

index 102516a6cce03fa7cff6fda939d81a73f8e6bdb3..35f7d41f303cd4c3bead23c32248fe2d5da38f51 100644 (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@',
index c6f1478c7898e9fa41e20da20ea7b8abcde65d85..d9a763f011cf70866e643168a714295b514a68e2 100644 (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@',
index 1d637e0455453379aa2221fb9d32ba5c34021d99..3340ac411f100bd6c7a3477b36b027ed42178029 100644 (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@',
index 90cdbe8a235443005a996753c553fb549ead1471..030511c6263a8f050aea02e141051a1729217702 100644 (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@',
index dec544fa67bde3e5ad077069de67da72b85b1d74..a7f683cb7404d267f3518e4f1e792550b756363a 100644 (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@',
index 72c8c0461da67a256f94e8ada2d7fee3348898ec..6504e68a71b389bb4295d660ef21fc68896b4fc1 100644 (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@',
index 651b1d91c6d79c7f5761606fa973d2fb2f1dd980..21e0b19c25dc3b7fc390e8324e826c06ec7e02a5 100644 (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@',
index 71c7cfba9db141b0c0a2515789822cd6fda08793..1997bb3ec29656201bdedaa863bd53146ff3fee1 100644 (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}">
               <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>
index 13b720bd4027e877c37b25fc5ee73d64de919645..c65a315593385ba6e16078207c6524ee31cc88bf 100644 (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>