diff --git a/WebsiteGenerator/Files/FileSystem.swift b/WebsiteGenerator/Files/FileSystem.swift index 42c4b2a..e4cddb5 100644 --- a/WebsiteGenerator/Files/FileSystem.swift +++ b/WebsiteGenerator/Files/FileSystem.swift @@ -187,7 +187,7 @@ final class FileSystem { } @discardableResult - func requireImage(source: String, destination: String, width: Int, desiredHeight: Int? = nil, createDoubleVersion: Bool = false) -> NSSize { + func requireImage(source: String, destination: String, width: Int, desiredHeight: Int? = nil) -> NSSize { let height = desiredHeight.unwrapped(CGFloat.init) let sourceUrl = input.appendingPathComponent(source) let image = ImageOutput(source: source, width: width, desiredHeight: desiredHeight) diff --git a/WebsiteGenerator/Generators/ThumbnailListGenerator.swift b/WebsiteGenerator/Generators/ThumbnailListGenerator.swift index 757f3f6..f939bb7 100644 --- a/WebsiteGenerator/Generators/ThumbnailListGenerator.swift +++ b/WebsiteGenerator/Generators/ThumbnailListGenerator.swift @@ -41,8 +41,15 @@ struct ThumbnailListGenerator { source: fullThumbnailPath, destination: fullThumbnailPath, width: style.width, - desiredHeight: style.height, - createDoubleVersion: true) + desiredHeight: style.height) + + // Create image version for high-resolution screens + files.requireImage( + source: fullThumbnailPath, + destination: fullThumbnailPath.insert("@2x", beforeLast: "."), + width: style.width * 2, + desiredHeight: style.height * 2) + return factory.thumbnail(style: style).generate(content, shouldIndent: false) } }