The '.. meta::' rST directive allows adding header metadata. Move the
specific metadata from page.xsl into the individual files and pass them
trhough into the header from page.xsl.

Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 docs/go/libvirt.rst     |  3 +++
 docs/go/libvirtxml.rst  |  3 +++
 docs/libvirt-go-xml.rst |  3 +++
 docs/libvirt-go.rst     |  3 +++
 docs/page.xsl           | 13 ++-----------
 5 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/docs/go/libvirt.rst b/docs/go/libvirt.rst
index 6a1344ad3e..09eaa66714 100644
--- a/docs/go/libvirt.rst
+++ b/docs/go/libvirt.rst
@@ -1,3 +1,6 @@
+.. meta::
+   :go-import: libvirt.org/go/libvirt git 
https://gitlab.com/libvirt/libvirt-go-module.git
+
 =========================================
 Libvirt Go Language API (with Go modules)
 =========================================
diff --git a/docs/go/libvirtxml.rst b/docs/go/libvirtxml.rst
index 5407d609f2..315499da1a 100644
--- a/docs/go/libvirtxml.rst
+++ b/docs/go/libvirtxml.rst
@@ -1,3 +1,6 @@
+.. meta::
+   :go-import: libvirt.org/go/libvirtxml git 
https://gitlab.com/libvirt/libvirt-go-xml-module.git
+
 ============================================
 Libvirt Go XML parsing API (with Go modules)
 ============================================
diff --git a/docs/libvirt-go-xml.rst b/docs/libvirt-go-xml.rst
index d2a488d99d..822dc73638 100644
--- a/docs/libvirt-go-xml.rst
+++ b/docs/libvirt-go-xml.rst
@@ -1,3 +1,6 @@
+.. meta::
+   :go-import: libvirt.org/libvirt-go-xml git 
https://gitlab.com/libvirt/libvirt-go-xml.git
+
 ===================================================
 Obsolete libvirt Go XML parsing API (no Go modules)
 ===================================================
diff --git a/docs/libvirt-go.rst b/docs/libvirt-go.rst
index 85ee3191b5..60ec9fbbb2 100644
--- a/docs/libvirt-go.rst
+++ b/docs/libvirt-go.rst
@@ -1,3 +1,6 @@
+.. meta::
+   :go-import: libvirt.org/libvirt-go git 
https://gitlab.com/libvirt/libvirt-go.git
+
 ================================================
 Obsolete libvirt Go Language API (no Go modules)
 ================================================
diff --git a/docs/page.xsl b/docs/page.xsl
index e3112fc9f8..27607e4d92 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -44,17 +44,8 @@
         <meta name="theme-color" content="#ffffff"/>
         <title>libvirt: <xsl:value-of 
select="html:html/html:body//html:h1"/></title>
         <meta name="description" content="libvirt, virtualization, 
virtualization API"/>
-        <xsl:if test="$pagesrc = 'docs/libvirt-go.rst'">
-          <meta name="go-import" content="libvirt.org/libvirt-go git 
https://gitlab.com/libvirt/libvirt-go.git"/>
-        </xsl:if>
-        <xsl:if test="$pagesrc = 'docs/libvirt-go-xml.rst'">
-          <meta name="go-import" content="libvirt.org/libvirt-go-xml git 
https://gitlab.com/libvirt/libvirt-go-xml.git"/>
-        </xsl:if>
-        <xsl:if test="$pagesrc = 'docs/go/libvirt.rst'">
-          <meta name="go-import" content="libvirt.org/go/libvirt git 
https://gitlab.com/libvirt/libvirt-go-module.git"/>
-        </xsl:if>
-        <xsl:if test="$pagesrc = 'docs/go/libvirtxml.rst'">
-          <meta name="go-import" content="libvirt.org/go/libvirtxml git 
https://gitlab.com/libvirt/libvirt-go-xml-module.git"/>
+        <xsl:if test="/html:html/html:head/html:meta[@name='go-import']">
+            <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">
-- 
2.40.1

Reply via email to