Improve settings, sidebars
This commit is contained in:
@ -15,7 +15,7 @@ extension Content {
|
||||
private static let dbPath = FileManager.default.documentDirectory.appendingPathComponent("db").path()
|
||||
|
||||
static let mock: Content = Content(
|
||||
websiteData: .mock,
|
||||
settings: .mock,
|
||||
posts: [.empty, .mock, .fullMock],
|
||||
pages: [.empty],
|
||||
tags: [.hiking, .mountains, .nature, .sports],
|
||||
|
@ -1,25 +1,48 @@
|
||||
import Foundation
|
||||
|
||||
extension WebsiteData {
|
||||
extension Settings {
|
||||
|
||||
static let mock: WebsiteData = .init(
|
||||
static let mock: Settings = .init(
|
||||
outputDirectoryPath: "/some/path",
|
||||
navigationBar: .init(iconPath: "/some/other/path", tags: []),
|
||||
posts: .mock,
|
||||
german: .german,
|
||||
english: .english)
|
||||
}
|
||||
|
||||
extension LocalizedWebsiteData {
|
||||
extension PostSettings {
|
||||
|
||||
static var german: LocalizedWebsiteData {
|
||||
static var mock: PostSettings {
|
||||
.init(postsPerPage: 20, contentWidth: 600)
|
||||
}
|
||||
}
|
||||
|
||||
extension LocalizedSettings {
|
||||
|
||||
static var german: LocalizedSettings {
|
||||
.init(navigationBarIconDescription: "Ein Symbol",
|
||||
posts: .german)
|
||||
}
|
||||
|
||||
static var english: LocalizedSettings {
|
||||
.init(navigationBarIconDescription: "An icon",
|
||||
posts: .english)
|
||||
}
|
||||
}
|
||||
|
||||
extension LocalizedPostSettings {
|
||||
|
||||
static var german: LocalizedPostSettings {
|
||||
.init(
|
||||
title: "Titel",
|
||||
description: "Beschreibung",
|
||||
iconDescription: "Icon")
|
||||
feedUrlPrefix: "blog")
|
||||
}
|
||||
|
||||
static var english: LocalizedWebsiteData {
|
||||
static var english: LocalizedPostSettings {
|
||||
.init(
|
||||
title: "A Title",
|
||||
description: "Description",
|
||||
iconDescription: "Icon")
|
||||
feedUrlPrefix: "feed")
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
extension WebsiteGeneratorConfiguration {
|
||||
|
||||
static let english = WebsiteGeneratorConfiguration(
|
||||
language: .english,
|
||||
outputDirectory: URL(fileURLWithPath: ""),
|
||||
postsPerPage: 20,
|
||||
postFeedTitle: "Posts",
|
||||
postFeedDescription: "The most recent posts on christophhagen.de",
|
||||
postFeedUrlPrefix: "feed",
|
||||
navigationIconPath: "/assets/icons/ch.svg",
|
||||
mainContentMaximumWidth: 600)
|
||||
|
||||
static let german = WebsiteGeneratorConfiguration(
|
||||
language: .german,
|
||||
outputDirectory: URL(fileURLWithPath: ""),
|
||||
postsPerPage: 20,
|
||||
postFeedTitle: "Beiträge",
|
||||
postFeedDescription: "Die neusten Beiträge auf christophhagen.de",
|
||||
postFeedUrlPrefix: "beiträge",
|
||||
navigationIconPath: "/assets/icons/ch.svg",
|
||||
mainContentMaximumWidth: 600)
|
||||
}
|
Reference in New Issue
Block a user