indent="yes"
encoding="UTF-8">
<xsl:apply-templates select="exsl:node-set($mainpage)" mode="page">
- <xsl:with-param name="pagename" select="concat($htmldir, '', $indexfile)"/>
<xsl:with-param name="timestamp" select="$timestamp"/>
</xsl:apply-templates>
</xsl:document>
indent="yes"
encoding="UTF-8">
<xsl:apply-templates select="exsl:node-set($subpage)" mode="page">
- <xsl:with-param name="pagename" select="concat($htmldir, '/libvirt-', @name, '.html')"/>
<xsl:with-param name="timestamp" select="$timestamp"/>
</xsl:apply-templates>
</xsl:document>
<!-- This is the master page structure -->
<xsl:template match="/" mode="page">
- <xsl:param name="pagename"/>
<xsl:param name="pagesrc"/>
<xsl:param name="timestamp"/>
<xsl:text disable-output-escaping="yes"><!DOCTYPE html>
</xsl:text>
<html>
<xsl:comment>
- This file is autogenerated from <xsl:value-of select="$pagename"/>.in
+ This file is autogenerated from <xsl:value-of select="$pagesrc"/>
Do not edit this file. Changes will be lost.
</xsl:comment>
<xsl:comment>
<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="$pagename = 'libvirt-go.html'">
+ <xsl:if test="$pagesrc = 'docs/libvirt-go.rst'">
<meta name="go-import" content="libvirt.org/libvirt-go git https://libvirt.org/git/libvirt-go.git"/>
</xsl:if>
- <xsl:if test="$pagename = 'libvirt-go-xml.html'">
+ <xsl:if test="$pagesrc = 'docs/libvirt-go-xml.rst'">
<meta name="go-import" content="libvirt.org/libvirt-go-xml git https://libvirt.org/git/libvirt-go-xml.git"/>
</xsl:if>
<xsl:apply-templates select="/html:html/html:head/html:script" mode="content"/>
<xsl:variable name="href_base">
<xsl:choose>
- <xsl:when test="$pagename = '404.html'">
+ <xsl:when test="$pagesrc = 'docs/404.html.in'">
<xsl:value-of select="'/'"/>
</xsl:when>
<xsl:otherwise>
<xsl:template match="/">
<xsl:apply-templates select="." mode="page">
- <xsl:with-param name="pagename" select="$pagename"/>
<xsl:with-param name="pagesrc" select="$pagesrc"/>
<xsl:with-param name="timestamp" select="$timestamp"/>
</xsl:apply-templates>
<xsl:template match="/">
<xsl:apply-templates select="." mode="page">
- <xsl:with-param name="pagename" select="$pagename"/>
<xsl:with-param name="pagesrc" select="$pagesrc"/>
<xsl:with-param name="timestamp" select="$timestamp"/>
</xsl:apply-templates>
#!/usr/bin/env python3
import argparse
-import os
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("pagesrc", type=str, default="", nargs='?', help="(optional) path to source file used for edit this page")
args = parser.parse_args()
-name = os.path.basename(args.htmlfile).replace('.html', '')
-
html_tmp = subprocess.run(
[
args.xsltproc,
- '--stringparam', 'pagename', name,
'--stringparam', 'pagesrc', args.pagesrc,
'--stringparam', 'builddir', args.builddir,
'--stringparam', 'timestamp', args.timestamp,