diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2023-05-17 12:52:41 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2023-08-10 12:21:02 +0200 |
commit | 539abfa7c3bbc9f0b234402083c743890b965cf7 (patch) | |
tree | c5566d96891c547967bcd042f1705d02010c5078 | |
parent | dfca100198e690f05987033bcd2b74e9057bcf8d (diff) |
tdf#155193 Do not deliver Help files with indexer=exclude
+ Add condition to skip indexer=exclude files.
+ delete empty files generated by exclude
+ delete empty directories generated by exclude
Change-Id: Id992e6c83086d3cd3911b84890a50b309ad92c3b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/151897
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r-- | CustomTarget_html.mk | 2 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index e73ea160e0..3bb5c0a19e 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -237,6 +237,8 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \ || exit \ ; done <"$$RESPONSEFILE" \ && rm "$$RESPONSEFILE" \ + && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) -type f -empty -delete \ + && find $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl/$*) -type d -empty -delete \ && touch $@ $(call gb_Trace_EndRange,$*/$(@F),XSL) diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 856dccbde0..d95425a593 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -118,8 +118,9 @@ ############# //--> -<!-- Create the document skeleton --> +<!-- Create the document skeleton, test if the indexer is to include in output --> <xsl:template match="/"> +<xsl:if test="//topic[@indexer='include']"> <xsl:variable name="htmlpage"><xsl:value-of select="concat(substring-before($filename,'.xhp'),'.html')"/></xsl:variable> <xsl:variable name="titleL10N"> <xsl:call-template name="brand"><xsl:with-param name="string"><xsl:value-of select="$title"/></xsl:with-param></xsl:call-template> @@ -278,6 +279,7 @@ </footer> </body> </html> +</xsl:if> </xsl:template> <!-- AHELP --> |