docs: go: Add 'go-import' metadata via rST

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Peter Krempa 2023-05-23 16:52:24 +02:00
parent 54c1f31fda
commit 9f49f60aca
5 changed files with 14 additions and 11 deletions

View File

@ -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)
=========================================

View File

@ -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)
============================================

View File

@ -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)
===================================================

View File

@ -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)
================================================

View File

@ -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">