Add tag overview, improve assets
This commit is contained in:
@ -18,16 +18,17 @@ extension Content {
|
||||
try storage.save(settings: settings.file)
|
||||
|
||||
let fileDescriptions: [FileDescriptions] = files.sorted().compactMap { file in
|
||||
guard !file.englishDescription.isEmpty || !file.germanDescription.isEmpty else {
|
||||
guard !file.english.isEmpty || !file.german.isEmpty else {
|
||||
return nil
|
||||
}
|
||||
return FileDescriptions(
|
||||
fileId: file.id,
|
||||
german: file.germanDescription.nonEmpty,
|
||||
english: file.englishDescription.nonEmpty)
|
||||
german: file.german.nonEmpty,
|
||||
english: file.english.nonEmpty)
|
||||
}
|
||||
|
||||
try storage.save(fileDescriptions: fileDescriptions)
|
||||
try storage.save(tagOverview: tagOverview?.file)
|
||||
|
||||
let externalFileList = files.filter { $0.isExternallyStored }.map { $0.id }
|
||||
try storage.save(externalFileList: externalFileList)
|
||||
@ -130,7 +131,7 @@ extension Settings {
|
||||
var file: SettingsFile {
|
||||
.init(
|
||||
paths: paths.file,
|
||||
navigationTags: navigationTags.map { $0.id },
|
||||
navigationItems: navigationItems.map { .init(type: $0.itemType, id: $0.id) },
|
||||
posts: posts.file,
|
||||
pages: pages.file,
|
||||
german: german.file,
|
||||
@ -138,34 +139,14 @@ extension Settings {
|
||||
}
|
||||
}
|
||||
|
||||
private extension PathSettings {
|
||||
|
||||
var file: PathSettingsFile {
|
||||
.init(outputDirectoryPath: outputDirectoryPath,
|
||||
pagesOutputFolderPath: pagesOutputFolderPath,
|
||||
imagesOutputFolderPath: imagesOutputFolderPath,
|
||||
filesOutputFolderPath: filesOutputFolderPath,
|
||||
videosOutputFolderPath: videosOutputFolderPath,
|
||||
tagsOutputFolderPath: tagsOutputFolderPath)
|
||||
}
|
||||
}
|
||||
|
||||
private extension PostSettings {
|
||||
|
||||
var file: PostSettingsFile {
|
||||
.init(postsPerPage: postsPerPage,
|
||||
contentWidth: contentWidth)
|
||||
}
|
||||
}
|
||||
|
||||
private extension PageSettings {
|
||||
|
||||
var file: PageSettingsFile {
|
||||
.init(pageUrlPrefix: pageUrlPrefix,
|
||||
contentWidth: contentWidth,
|
||||
largeImageWidth: largeImageWidth,
|
||||
pageLinkImageSize: pageLinkImageSize,
|
||||
javascriptFilesPath: javascriptFilesPath)
|
||||
swiperCssFile: swiperCssFile?.id,
|
||||
swiperJsFile: swiperJsFile?.id,
|
||||
defaultCssFile: defaultCssFile?.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user