]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: adapt filling of <head> section for rst2html output
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 18 Oct 2019 14:58:56 +0000 (15:58 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 4 Dec 2019 15:48:28 +0000 (15:48 +0000)
The HTML from rst2html doesn't have <h1> immediately under the <body>
tag, instead there is at least one <div> in between.

There are also many things added in the <head> section that we don't
want to have copied over, since our templating system already adds
suitable <head> elements.

We only need to copy the <script> to make index.html work.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
docs/page.xsl

index 6f429ae087c53df56a562a09e9813cc0c2efe141..70dfec6df6bda7b501abe5eb1f8402c2ff91c3c4 100644 (file)
@@ -97,9 +97,9 @@
         <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
         <link rel="manifest" href="/manifest.json"/>
         <meta name="theme-color" content="#ffffff"/>
-        <title>libvirt: <xsl:value-of select="html:html/html:body/html:h1"/></title>
+        <title>libvirt: <xsl:value-of select="html:html/html:body//html:h1"/></title>
         <meta name="description" content="libvirt, virtualization, virtualization API"/>
-        <xsl:apply-templates select="/html:html/html:head/*" mode="content"/>
+        <xsl:apply-templates select="/html:html/html:head/html:script" mode="content"/>
 
         <script type="text/javascript" src="{$href_base}js/main.js">
           <xsl:comment>// forces non-empty element</xsl:comment>