From: Peter Krempa <[email protected]>

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

Signed-off-by: Peter Krempa <[email protected]>
---
 docs/go/meson.build              | 1 +
 docs/html/meson.build            | 1 +
 docs/kbase/internals/meson.build | 1 +
 docs/kbase/meson.build           | 1 +
 docs/logos/meson.build           | 1 +
 docs/manpages/meson.build        | 1 +
 docs/meson.build                 | 1 +
 docs/page.xsl                    | 5 +++--
 docs/site.xsl                    | 1 +
 9 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/docs/go/meson.build b/docs/go/meson.build
index 102516a6cc..35f7d41f30 100644
--- a/docs/go/meson.build
+++ b/docs/go/meson.build
@@ -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@',
diff --git a/docs/html/meson.build b/docs/html/meson.build
index c6f1478c78..d9a763f011 100644
--- a/docs/html/meson.build
+++ b/docs/html/meson.build
@@ -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@',
diff --git a/docs/kbase/internals/meson.build b/docs/kbase/internals/meson.build
index 1d637e0455..3340ac411f 100644
--- a/docs/kbase/internals/meson.build
+++ b/docs/kbase/internals/meson.build
@@ -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@',
diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build
index 90cdbe8a23..030511c626 100644
--- a/docs/kbase/meson.build
+++ b/docs/kbase/meson.build
@@ -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@',
diff --git a/docs/logos/meson.build b/docs/logos/meson.build
index dec544fa67..a7f683cb74 100644
--- a/docs/logos/meson.build
+++ b/docs/logos/meson.build
@@ -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@',
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index 72c8c0461d..6504e68a71 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -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@',
diff --git a/docs/meson.build b/docs/meson.build
index 651b1d91c6..21e0b19c25 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -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@',
diff --git a/docs/page.xsl b/docs/page.xsl
index 71c7cfba9d..1997bb3ec2 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -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>
diff --git a/docs/site.xsl b/docs/site.xsl
index 13b720bd40..c65a315593 100644
--- a/docs/site.xsl
+++ b/docs/site.xsl
@@ -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>

-- 
2.51.1

Reply via email to