Full page content, fixes, cleaner settings
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
|
||||
struct LocalizedSettingsFile {
|
||||
|
||||
let navigationBarIconDescription: String
|
||||
|
||||
let posts: LocalizedPostSettingsFile
|
||||
|
||||
}
|
||||
|
||||
extension LocalizedSettingsFile: Codable {
|
||||
|
||||
}
|
||||
|
||||
extension LocalizedSettingsFile {
|
||||
|
||||
static var `default`: LocalizedSettingsFile {
|
||||
.init(navigationBarIconDescription: "An icon",
|
||||
posts: .default)
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
|
||||
struct NavigationBarSettingsFile {
|
||||
|
||||
/// The path to the main icon in the navigation bar
|
||||
let navigationIconPath: String
|
||||
|
||||
/// The tags to show in the navigation bar
|
||||
let navigationTags: [String]
|
||||
}
|
||||
|
||||
extension NavigationBarSettingsFile: Codable { }
|
||||
|
||||
extension NavigationBarSettingsFile {
|
||||
|
||||
static var `default`: NavigationBarSettingsFile {
|
||||
.init(navigationIconPath: "/assets/icons/icon.svg",
|
||||
navigationTags: [])
|
||||
}
|
||||
}
|
@ -6,6 +6,10 @@ struct PageSettingsFile {
|
||||
let contentWidth: Int
|
||||
|
||||
let largeImageWidth: Int
|
||||
|
||||
let pageLinkImageSize: Int
|
||||
|
||||
let javascriptFilesPath: String
|
||||
}
|
||||
|
||||
extension PageSettingsFile: Codable {
|
||||
@ -17,6 +21,8 @@ extension PageSettingsFile {
|
||||
static var `default`: PageSettingsFile {
|
||||
.init(pageUrlPrefix: "page",
|
||||
contentWidth: 600,
|
||||
largeImageWidth: 1200)
|
||||
largeImageWidth: 1200,
|
||||
pageLinkImageSize: 180,
|
||||
javascriptFilesPath: "/assets/js")
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,42 @@
|
||||
|
||||
struct PathSettingsFile {
|
||||
|
||||
let outputDirectoryPath: String
|
||||
|
||||
let pagesOutputFolderPath: String
|
||||
|
||||
let imagesOutputFolderPath: String
|
||||
|
||||
let filesOutputFolderPath: String
|
||||
|
||||
let videosOutputFolderPath: String
|
||||
|
||||
let tagsOutputFolderPath: String
|
||||
|
||||
init(outputDirectoryPath: String, pagesOutputFolderPath: String, imagesOutputFolderPath: String, filesOutputFolderPath: String, videosOutputFolderPath: String, tagsOutputFolderPath: String) {
|
||||
self.outputDirectoryPath = outputDirectoryPath
|
||||
self.pagesOutputFolderPath = pagesOutputFolderPath
|
||||
self.imagesOutputFolderPath = imagesOutputFolderPath
|
||||
self.filesOutputFolderPath = filesOutputFolderPath
|
||||
self.videosOutputFolderPath = videosOutputFolderPath
|
||||
self.tagsOutputFolderPath = tagsOutputFolderPath
|
||||
}
|
||||
}
|
||||
|
||||
extension PathSettingsFile: Codable {
|
||||
|
||||
}
|
||||
|
||||
extension PathSettingsFile {
|
||||
|
||||
static var `default`: PathSettingsFile {
|
||||
PathSettingsFile(
|
||||
outputDirectoryPath: "build",
|
||||
pagesOutputFolderPath: "page",
|
||||
imagesOutputFolderPath: "image",
|
||||
filesOutputFolderPath: "file",
|
||||
videosOutputFolderPath: "video",
|
||||
tagsOutputFolderPath: "tag")
|
||||
}
|
||||
|
||||
}
|
@ -2,18 +2,18 @@ import Foundation
|
||||
|
||||
struct SettingsFile {
|
||||
|
||||
/// The file path to the output directory
|
||||
let outputDirectoryPath: String
|
||||
let paths: PathSettingsFile
|
||||
|
||||
let navigationBar: NavigationBarSettingsFile
|
||||
/// The tags to show in the navigation bar
|
||||
let navigationTags: [String]
|
||||
|
||||
let posts: PostSettingsFile
|
||||
|
||||
let pages: PageSettingsFile
|
||||
|
||||
let german: LocalizedSettingsFile
|
||||
let german: LocalizedPostSettingsFile
|
||||
|
||||
let english: LocalizedSettingsFile
|
||||
let english: LocalizedPostSettingsFile
|
||||
}
|
||||
|
||||
extension SettingsFile: Codable { }
|
||||
@ -22,8 +22,8 @@ extension SettingsFile {
|
||||
|
||||
static var `default`: SettingsFile {
|
||||
.init(
|
||||
outputDirectoryPath: "",
|
||||
navigationBar: .default,
|
||||
paths: .default,
|
||||
navigationTags: [],
|
||||
posts: .default,
|
||||
pages: .default,
|
||||
german: .default,
|
||||
|
Reference in New Issue
Block a user