CHGenerator/Sources/Generator/Templates/Elements/PageLinkTemplate.swift

25 lines
564 B
Swift
Raw Normal View History

2022-09-25 17:19:07 +02:00
import Foundation
struct PageLinkTemplate: Template {
enum Key: String, CaseIterable {
2022-12-21 12:59:42 +01:00
case altText = "ALT_TEXT"
2022-09-25 17:19:07 +02:00
case url = "URL"
case image = "IMAGE"
case title = "TITLE"
case path = "PATH"
case description = "DESCRIPTION"
case className = "CLASS"
}
static let templateName = "page-link.html"
let raw: String
2022-12-02 10:25:54 +01:00
let results: GenerationResultsHandler
2022-09-25 17:19:07 +02:00
func makePath(components: [String]) -> String {
components.joined(separator: " » ") //  » ")
}
}