Rework path storage, add start screen

This commit is contained in:
Christoph Hagen
2024-12-17 23:05:45 +01:00
parent 849585acc7
commit 9a53e020a7
21 changed files with 408 additions and 229 deletions

View File

@ -31,7 +31,7 @@ final class ImageGenerator {
func prepareForGeneration() -> Bool {
inOutputImagesFolder { imagesFolder in
do {
try imagesFolder.ensureFolderExistence()
try imagesFolder.createIfNeeded()
return true
} catch {
print("Failed to create output images folder: \(error)")

View File

@ -17,11 +17,10 @@ final class LocalizedWebsiteGenerator {
self.imageGenerator = ImageGenerator(
storage: content.storage,
settings: content.settings)
self.outputDirectory = content.storage.outputPath!
}
private var outputDirectory: URL {
content.settings.outputDirectory
}
private let outputDirectory: URL
private var postsPerPage: Int {
content.settings.posts.postsPerPage