To install it into your Publish package, add it as a dependency within your
let package = Package( ... dependencies: [ ... .package(name: "ResponsivePublishPlugin", url: "https://github.com/Cordt/ResponsivePublishPlugin", .branch("main")) ], targets: [ .target( ... dependencies: [ ... "ResponsivePublishPlugin" ] ) ] ... )
Then import ResponsivePublishPlugin wherever you’d like to use it:
The plugin can then be used within any publishing pipeline like this:
import ResponsivePublishPlugin ... try DeliciousRecipes().publish(using: [ ... .generateHTML(), .installPlugin(.generateOptimizedImages()), ... ])
It is important that the HTML files are generated prior to installing the plugin, otherwise they cannot be rewritten.