Forward pages for the Publish static website framework
This plugin for Publish. Actually, it currently uses my fork at https://github.com/Vithanco/Publish, until John starts to maintain his again.
To install this plugin into your Publish package, add it as a dependency within your Package.swift manifest:
let package = Package(
...
dependencies: [
...
.package(
url: "https://github.com/vithanco/Publish_ForwardPages.git",
branch: "main")
],
targets: [
.target(
...
dependencies: [
...
"Publish_ForwardPages.git"
]
)
]
...
)And import to use it:
import Publish_ForwardPages.gitFor more information on how to use the Swift Package Manager, check out its official documentation.
You can use this to forward pages from one URL to another.
let table = [
// examples only
Forward("starwars/lucasarts", "disney/starwars"),
Forward("raider", "twix"),
Forward("domain/IBIS", "notations/IBIS/index")
]
// ...
try mysite().publish(using: [
// ...
.generateSiteMap(indentedBy: nil), // normally there
.installPlugin(.createForwardPages(table: table)),
// ...
])MIT License