Skip to content

A Publish plugin to verify that all resources to which items and pages have relative links exist.

License

Notifications You must be signed in to change notification settings

wacumov/VerifyResourcesExistPublishPlugin

Repository files navigation

VerifyResourcesExistPublishPlugin

Status Swift 5.1 Swift Package Mac & Linux Publish Plugin

A Publish plugin to verify that all resources to which items and pages have relative links exist.

Installation

To install it into your Publish package, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        ...
        .package(url: "https://github.com/wacumov/VerifyResourcesExistPublishPlugin", from: "0.1.0")
    ],
    targets: [
        .target(
            ...
            dependencies: [
                ...
                "VerifyResourcesExistPublishPlugin"
            ]
        )
    ]
    ...
)

Then import VerifyResourcesExistPublishPlugin wherever you’d like to use it:

import VerifyResourcesExistPublishPlugin

Usage

The plugin can then be used within any publishing pipeline like this:

import VerifyResourcesExistPublishPlugin
...
try DeliciousRecipes().publish(using: [
    ...
    .installPlugin(.verifyResourcesExist())
    ...
])

Note: .installPlugin(.verifyResourcesExist()) step should be performed after .copyResources() and .addMarkdownFiles() steps. Thus if you use the default publishing pipeline then pass .installPlugin(.verifyResourcesExist()) step to additionalSteps parameter instead of plugins parameter.

About

A Publish plugin to verify that all resources to which items and pages have relative links exist.

Topics

Resources

License

Stars

Watchers

Forks

Languages