The path to the DocC archive.
Initializerinit(archive
init(archivePath:redirectRoot:redirectMissingTrailingSlash:)
Create a new middleware that serves files from the DocC archive at
archivePath
.Framework
- Vapor
Doc C
Declaration
init(archivePath: URL, redirectRoot: String? = nil, redirectMissingTrailingSlash: Bool = false)
Parameters
archivePath
redirectRoot
When non-nil the root (
/
) will be redirected to the provided path. Defaults tonil.
redirectMissingTrailingSlash
When
true
paths the require trailing slashes will be redirected to include the trailing slash. Defaults tofalse
.
Discussion
When the redirect
parameter is true
the /documentation
and /tutorials
endpoints will be redirected to /documentation/
and /tutorials/
respectively.