Fix links and images in related content
This commit is contained in:
parent
112bbe252c
commit
58f7642ca5
@ -253,7 +253,6 @@ struct PageContentGenerator {
|
||||
return ""
|
||||
}
|
||||
var content = [PageLinkTemplate.Key: String]()
|
||||
content[.url] = page.relativePathToOtherSiteElement(file: linkedPage.fullPageUrl(for: language))
|
||||
|
||||
content[.title] = linkedPage.title(for: language)
|
||||
|
||||
@ -267,13 +266,12 @@ struct PageContentGenerator {
|
||||
content[.url] = "href=\"\(relativePageUrl)\""
|
||||
}
|
||||
|
||||
content[.image] = relativeImageUrl
|
||||
content[.image] = relativeImageUrl.dropAfterLast(".")
|
||||
if let suffix = metadata.thumbnailSuffix {
|
||||
content[.title] = factory.html.make(title: metadata.title, suffix: suffix)
|
||||
} else {
|
||||
content[.title] = metadata.title
|
||||
}
|
||||
content[.image2x] = relativeImageUrl.insert("@2x", beforeLast: ".")
|
||||
|
||||
let path = linkedPage.makePath(language: language, from: siteRoot)
|
||||
content[.path] = factory.pageLink.makePath(components: path)
|
||||
|
@ -5,7 +5,6 @@ struct PageLinkTemplate: Template {
|
||||
enum Key: String, CaseIterable {
|
||||
case url = "URL"
|
||||
case image = "IMAGE"
|
||||
case image2x = "IMAGE_2X"
|
||||
case title = "TITLE"
|
||||
case path = "PATH"
|
||||
case description = "DESCRIPTION"
|
||||
|
Loading…
Reference in New Issue
Block a user