docs: xsl: Don't generate pointless index pages for qemu/admin/lxc API

The index page only really makes sense for the top level directory. The
specific index files are unreferenced since last commit. Drop them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-11-03 13:16:31 +01:00
parent 3f558e3bd9
commit cca6787b15
2 changed files with 16 additions and 15 deletions

View File

@ -28,6 +28,7 @@ index_api_gen = custom_target(
xsltproc_prog, '--nonet', '-o', docs_builddir, xsltproc_prog, '--nonet', '-o', docs_builddir,
'--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'builddir', meson.project_build_root(),
'--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'indexfile', 'index.html',
'@INPUT@', '@INPUT@',
], ],
install: true, install: true,
@ -48,14 +49,12 @@ foreach name : [ 'admin', 'lxc', 'qemu' ]
get_variable('docs_@0@_api_xml'.format(name)), get_variable('docs_@0@_api_xml'.format(name)),
], ],
output: [ output: [
'index-@0@.html'.format(name),
'libvirt-libvirt-@0@.html'.format(name), 'libvirt-libvirt-@0@.html'.format(name),
], ],
command: [ command: [
xsltproc_prog, '--nonet', '-o', docs_builddir, xsltproc_prog, '--nonet', '-o', docs_builddir,
'--stringparam', 'builddir', meson.project_build_root(), '--stringparam', 'builddir', meson.project_build_root(),
'--stringparam', 'timestamp', docs_timestamp, '--stringparam', 'timestamp', docs_timestamp,
'--stringparam', 'indexfile', 'index-@0@.html'.format(name),
'@INPUT@', '@INPUT@',
], ],
install: true, install: true,

View File

@ -22,7 +22,7 @@
<!-- Build keys for all symbols --> <!-- Build keys for all symbols -->
<xsl:key name="symbols" match="/api/symbols/*" use="@name"/> <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
<xsl:param name="indexfile" select="'index.html'"/> <xsl:param name="indexfile" select="''"/>
<!-- the target directory for the HTML output --> <!-- the target directory for the HTML output -->
<xsl:variable name="htmldir">html</xsl:variable> <xsl:variable name="htmldir">html</xsl:variable>
@ -823,18 +823,20 @@
<xsl:template match="/"> <xsl:template match="/">
<!-- Save the main index.html as well as a couple of copies --> <!-- Save the main index.html as well as a couple of copies -->
<xsl:variable name="mainpage"> <xsl:if test="$indexfile != ''">
<xsl:call-template name="mainpage"/> <xsl:variable name="mainpage">
</xsl:variable> <xsl:call-template name="mainpage"/>
<xsl:document </xsl:variable>
href="{concat($htmldir, '/', $indexfile)}" <xsl:document
method="xml" href="{concat($htmldir, '/', $indexfile)}"
indent="yes" method="xml"
encoding="UTF-8"> indent="yes"
<xsl:apply-templates select="exsl:node-set($mainpage)" mode="page"> encoding="UTF-8">
<xsl:with-param name="timestamp" select="$timestamp"/> <xsl:apply-templates select="exsl:node-set($mainpage)" mode="page">
</xsl:apply-templates> <xsl:with-param name="timestamp" select="$timestamp"/>
</xsl:document> </xsl:apply-templates>
</xsl:document>
</xsl:if>
<xsl:for-each select="/api/files/file"> <xsl:for-each select="/api/files/file">
<xsl:variable name="subpage"> <xsl:variable name="subpage">