Skip to content

Commit 2f0b2c7

Browse files
HTML: add html.build-preview stringparam
1 parent e84a094 commit 2f0b2c7

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

xsl/pretext-html.xsl

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,20 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
104104
<!-- Or make a thin customization layer and use 'select' to provide overrides -->
105105
<!-- See more generally applicable parameters in pretext-common.xsl file -->
106106

107-
<!-- Fast HTML build that skips steps not needed for quickly rebuilding -->
107+
<!-- Fast HTML builds that skip steps not needed for quickly rebuilding -->
108108
<!-- individual pages in a document. -->
109-
<!-- Skips rebuilding search index, theme, Runestone manifest, -->
110-
<!-- moving external/generated files, ... -->
111-
<!-- Should produce clean diffs against pages from non-incremental build -->
109+
<!-- build-incremental: skips rebuilding search index, theme, Runestone -->
110+
<!-- manifest, moving external/generated files,... -->
111+
<!-- Should produce clean diffs against pages from non-incremental build -->
112+
<!-- build-preview, implies build-incremental and, when combined with -->
113+
<!-- subtree, prunes the document to avoid processing nodes not part of -->
114+
<!-- the output subtree. -->
115+
<!-- Will produce pages that are visually the same but have diffs when -->
116+
<!-- compared to non-preview builds -->
117+
<xsl:param name="html.build-preview" select="''"/>
118+
<xsl:variable name="b-build-preview" select="$html.build-preview = 'yes'"/>
112119
<xsl:param name="html.build-incremental" select="''"/>
113-
<xsl:variable name="b-build-incremental" select="$html.build-incremental = 'yes'"/>
120+
<xsl:variable name="b-build-incremental" select="$b-build-preview or $html.build-incremental = 'yes'"/>
114121

115122
<!-- CSS and Javascript Directories -->
116123
<!-- These are convenience variables to specify file prefixes -->

0 commit comments

Comments
 (0)