diff --git a/WebsiteGenerator/Files/ValidationLog.swift b/WebsiteGenerator/Files/ValidationLog.swift index f2abf3e..2f81790 100644 --- a/WebsiteGenerator/Files/ValidationLog.swift +++ b/WebsiteGenerator/Files/ValidationLog.swift @@ -106,8 +106,12 @@ final class ValidationLog { func linkPreviewThumbnail(customFile: String?, for language: String, in folder: URL, source: String) -> String? { if let customFile = customFile { - #warning("Allow absolute urls for link preview thumbnails") - let customFileUrl = folder.appendingPathComponent(customFile) + let customFileUrl: URL + if customFile.starts(with: "/") { + customFileUrl = URL(fileURLWithPath: customFile) + } else { + customFileUrl = folder.appendingPathComponent(customFile) + } guard customFileUrl.exists else { missing(customFile, requiredBy: "property 'linkPreviewImage' in metadata of \(source)") return nil