To install it into your Publish package, add it as a dependency within your Package.swift manifest:
let package = Package( ... dependencies: [ ... .package(name: "MatomoPublishPlugin", url: "https://github.com/marcelvoss/MatomoPublishPlugin", from: "0.1.0") ], targets: [ .target( ... dependencies: [ ... "MatomoPublishPlugin" ] ) ] ... )
Then import SplashPublishPlugin wherever you’d like to use it:
The plugin can then be used within any publishing pipeline like this:
import SplashPublishPlugin ... try DeliciousRecipes().publish(using: [ .generateHTML(withTheme: .theme), .installPlugin(.track(using: .init(siteIdentifier: your-site-identifier, trackingInstallationURL: URL(string: "https://your-matomo-installation.com")!))), ... ])
Just keep in mind to install the plugin after your generateHTML step, as it modifies the previously generated HTML files.