Tidy HTML step for Publish
To install the step, add it as a dependency within your
let package = Package( ... dependencies: [ ... .package(url: "https://github.com/john-mueller/TidyHTMLPublishStep", from: "0.1.0") ], targets: [ .target( ... dependencies: [ ... "TidyHTMLPublishStep" ] ) ] ... )
TidyHTMLPublishStep where you'd like to use it.
tidyHTML(withIndentation:) step should be inserted into your publishing pipeline after your HTML is generated. The default indentation is one space, if the parameter is omitted.
import TidyHTMLPublishStep ... try DeliciousRecipes().publish(using: [ ... .generateHTML(withTheme: .foundation), ... .tidyHTML(indentedBy: .spaces(4)) ... ])
This package also provides an alternate convenience API to the
Website.publish(withTheme:...:additionalSteps:...) method, replacing
tidyHTML step should be passed to the
import TidyHTMLPublishStep ... try DeliciousRecipes().publish( withTheme: theme, postGenerationSteps: [ .tidyHTML() ] )