23 lines
521 B
Swift
23 lines
521 B
Swift
|
import Foundation
|
||
|
|
||
|
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"
|
||
|
case className = "CLASS"
|
||
|
}
|
||
|
|
||
|
static let templateName = "page-link.html"
|
||
|
|
||
|
let raw: String
|
||
|
|
||
|
func makePath(components: [String]) -> String {
|
||
|
components.joined(separator: " » ") //  » ")
|
||
|
}
|
||
|
}
|