Simplify images, tag overview
This commit is contained in:
@ -56,7 +56,6 @@ final class Storage: ObservableObject {
|
||||
|
||||
// MARK: Pages
|
||||
|
||||
|
||||
private func pageContentFileName(_ id: String, _ language: ContentLanguage) -> String {
|
||||
"\(id)-\(language.rawValue).md"
|
||||
}
|
||||
@ -236,6 +235,23 @@ final class Storage: ObservableObject {
|
||||
|
||||
// MARK: Files
|
||||
|
||||
/**
|
||||
The full path to a resource file in the content folder
|
||||
- Parameter file: The filename of the file
|
||||
- Note: Only for resource files, since path is relative to files folder
|
||||
*/
|
||||
func path(toFile file: String) -> URL? {
|
||||
contentScope?.fullPath(to: filePath(file: file))
|
||||
}
|
||||
|
||||
/**
|
||||
The full file path to a file in the output folder
|
||||
- Parameter relativePath: The path of the file relative to the output folder
|
||||
*/
|
||||
func outputPath(to relativePath: String) -> URL? {
|
||||
outputScope?.fullPath(to: relativePath)
|
||||
}
|
||||
|
||||
private func filePath(file fileId: String) -> String {
|
||||
filesFolderName + "/" + fileId
|
||||
}
|
||||
@ -337,6 +353,7 @@ final class Storage: ObservableObject {
|
||||
}
|
||||
print("Found \(allImages.count) generated images")
|
||||
let images = Set(allImages)
|
||||
#warning("TODO: Fix counting generated images")
|
||||
return imageSet.reduce(into: [:]) { result, imageName in
|
||||
let prefix = imageName.fileNameWithoutExtension + "@"
|
||||
let versions = images.filter { $0.hasPrefix(prefix) }
|
||||
|
Reference in New Issue
Block a user