Skip to content

A Publish plugin to detect broken urls in html files in the output folder.

License

Notifications You must be signed in to change notification settings

ericmaciel/DetectBrokenUrlsPublishPlugin

Repository files navigation

Detect Broken URLs plugin for Publish

A Publish plugin to detect broken urls in html files in the output folder.

Installation

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

let package = Package(
    ...
    dependencies: [
        ...
        .package(name: "DetectBrokenUrlsPublishPlugin", url: "https://github.com/[user_name]/detectbrokenurlspublishplugin", from: "0.1.0")
    ],
    targets: [
        .target(
            ...
            dependencies: [
                ...
                "DetectBrokenUrlsPublishPlugin"
            ]
        )
    ]
    ...
)

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

import DetectBrokenUrlsPublishPlugin

For more information on how to use the Swift Package Manager, check out this article, or its official documentation.

Usage

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

import DetectBrokenUrlsPublishPlugin
...
try Website().publish(using: [
    ...
    .installPlugin(.detectBrokenUrls),
    ...
])

Note, that the html files must already be present in the output folder at the corresponding step in the publishing pipeline. It is therefore best to add this step after .generateHTML(...).

License

Lincensed under the MIT license.

About

A Publish plugin to detect broken urls in html files in the output folder.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published