diff options
author | Graham Christensen <graham@grahamc.com> | 2019-07-04 09:06:39 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2019-07-04 09:16:06 -0400 |
commit | fa47df617443b6bd7be0fe0239418c241df146c3 (patch) | |
tree | 62403f13912681f858fb79a49590b7578b516d5b /doc/doc-support | |
parent | 5a0696f6d0bf3344437eb1c83f1108e46664e24a (diff) |
doc: move parameters to an XML file
Diffstat (limited to 'doc/doc-support')
-rw-r--r-- | doc/doc-support/default.nix | 22 | ||||
-rw-r--r-- | doc/doc-support/parameters.xml | 14 |
2 files changed, 36 insertions, 0 deletions
diff --git a/doc/doc-support/default.nix b/doc/doc-support/default.nix index c8be039fa7e0..53990b677196 100644 --- a/doc/doc-support/default.nix +++ b/doc/doc-support/default.nix @@ -3,6 +3,26 @@ let locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; }; functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs; }; version = pkgs.lib.version; + + epub-xsl = pkgs.writeText "epub.xsl" '' + <?xml version='1.0'?> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:import href="${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl" /> + <xsl:import href="${./parameters.xml}"/> + </xsl:stylesheet> + ''; + + xhtml-xsl = pkgs.writeText "xhtml.xsl" '' + <?xml version='1.0'?> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:import href="${pkgs.docbook_xsl_ns}/xml/xsl/docbook/xhtml/docbook.xsl" /> + <xsl:import href="${./parameters.xml}"/> + </xsl:stylesheet> + ''; in pkgs.runCommand "doc-support" {} '' mkdir result @@ -13,6 +33,8 @@ in pkgs.runCommand "doc-support" {} ln -s ${pkgs.docbook5}/xml/rng/docbook/docbook.rng ./docbook.rng ln -s ${pkgs.docbook_xsl_ns}/xml/xsl ./xsl + ln -s ${epub-xsl} ./epub.xsl + ln -s ${xhtml-xsl} ./xhtml.xsl ln -s ${../../nixos/doc/xmlformat.conf} ./xmlformat.conf ln -s ${pkgs.documentation-highlighter} ./highlightjs diff --git a/doc/doc-support/parameters.xml b/doc/doc-support/parameters.xml new file mode 100644 index 000000000000..bc13e2b70dec --- /dev/null +++ b/doc/doc-support/parameters.xml @@ -0,0 +1,14 @@ +<?xml version='1.0'?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:param name="section.autolabel" select="1" /> + <xsl:param name="section.label.includes.component.label" select="1" /> + <xsl:param name="html.stylesheet" select="'style.css overrides.css highlightjs/mono-blue.css'" /> + <xsl:param name="html.script" select="'./highlightjs/highlight.pack.js ./highlightjs/loader.js'" /> + <xsl:param name="xref.with.number.and.title" select="1" /> + <xsl:param name="use.id.as.filename" select="1" /> + <xsl:param name="toc.section.depth" select="3" /> + <xsl:param name="admon.style" select="''" /> + <xsl:param name="callout.graphics.extension" select="'.svg'" /> +</xsl:stylesheet> |