Generate open graph meta tags
This commit is contained in:
@ -246,6 +246,20 @@ final class FileResource: Item, LocalizedItem {
|
||||
.init(image: self, type: type, maximumWidth: width, maximumHeight: height)
|
||||
}
|
||||
|
||||
func linkPreviewImage(results: PageGenerationResults) -> String {
|
||||
let type: FileType
|
||||
switch self.type {
|
||||
case .jpg, .png, .gif: type = self.type
|
||||
default: type = .jpg
|
||||
}
|
||||
let version = imageVersion(
|
||||
width: content.settings.general.linkPreviewImageWidth,
|
||||
height: content.settings.general.linkPreviewImageHeight,
|
||||
type: type)
|
||||
results.require(image: version)
|
||||
return content.settings.general.url + version.outputPath
|
||||
}
|
||||
|
||||
// MARK: Paths
|
||||
|
||||
func removeFileFromOutputFolder() {
|
||||
|
Reference in New Issue
Block a user