Added a configurable site origin to the ConfigReader+Properties extension in the Website library target.
This commit is contained in:
@@ -240,6 +240,17 @@ package extension ConfigReader {
|
||||
)
|
||||
}
|
||||
|
||||
/// The public origin the site is served at (scheme and host, no trailing slash), read from the `site.origin` key.
|
||||
///
|
||||
/// The redirects and any absolute links derive from it, so a staging deployment can point it at itself — or leave it unset — without the
|
||||
/// production origin leaking into its markup.
|
||||
var siteOrigin: String {
|
||||
string(
|
||||
forKey: .Site.origin,
|
||||
default: .Site.origin
|
||||
)
|
||||
}
|
||||
|
||||
/// The directory the static files are served from, read from the `path.staticFiles` key.
|
||||
var staticFilesPath: String {
|
||||
string(
|
||||
|
||||
Reference in New Issue
Block a user