Add command for pretty page links

This commit is contained in:
Christoph Hagen
2022-09-25 17:19:07 +02:00
parent 66dcd43082
commit f2ee06b1d7
7 changed files with 144 additions and 7 deletions

View File

@@ -0,0 +1,22 @@
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: " » ") //  » ")
}
}