Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wacumov/VerifyResourcesExistPublishPlugin
A Publish plugin to verify that all resources to which items and pages have relative links exist.
https://github.com/wacumov/VerifyResourcesExistPublishPlugin
plugin publish publish-plugin
Last synced: about 2 months ago
JSON representation
A Publish plugin to verify that all resources to which items and pages have relative links exist.
- Host: GitHub
- URL: https://github.com/wacumov/VerifyResourcesExistPublishPlugin
- Owner: wacumov
- License: mit
- Created: 2020-01-18T13:48:53.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-18T18:02:08.000Z (almost 5 years ago)
- Last Synced: 2024-08-02T07:02:06.354Z (5 months ago)
- Topics: plugin, publish, publish-plugin
- Language: Swift
- Homepage:
- Size: 3.91 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-publish - Verify Resources Exist
README
# VerifyResourcesExistPublishPlugin
[![Status](https://github.com/wacumov/VerifyResourcesExistPublishPlugin/workflows/Test/badge.svg?branch=master)](https://github.com/wacumov/VerifyResourcesExistPublishPlugin/actions?query=workflow%3ATest+branch%3Amaster)
![Swift 5.1](https://img.shields.io/badge/Swift-5.1-orange.svg)
[![Swift Package](https://img.shields.io/static/v1?label=Swift&message=Package&logo=Swift&color=fa7343&style=flat)](https://github.com/Apple/swift-package-manager)
![Mac & Linux](https://img.shields.io/badge/platforms-mac+linux-brightgreen.svg?style=flat)
![Publish Plugin](https://img.shields.io/badge/Publish-Plugin-orange.svg?style=flat)A [Publish](https://github.com/johnsundell/publish) plugin to verify that all resources to which items and pages have relative links exist.
## Installation
To install it into your [Publish](https://github.com/johnsundell/publish) package, add it as a dependency within your `Package.swift` manifest:
```swift
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:
```swift
import VerifyResourcesExistPublishPlugin
```## Usage
The plugin can then be used within any publishing pipeline like this:
```swift
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.