Add page id feature

This commit is contained in:
Christoph Hagen
2022-08-31 00:02:42 +02:00
parent ee1ad60b77
commit 268ab205b5
5 changed files with 87 additions and 21 deletions

View File

@ -58,7 +58,7 @@ struct LocalizedSiteTemplate {
let sections = site.sortedItems.map {
PrefilledTopBarTemplate.SectionInfo(
name: $0.title(for: language),
url: "\($0.path)/\(language).html")
url: $0.path + Element.htmlPagePathAddition(for: language))
}
self.topBar = try .init(
@ -83,7 +83,7 @@ struct LocalizedSiteTemplate {
func makeBackLink(text: String, language: String) -> String {
let content: [BackNavigationTemplate.Key : String] = [
.text: text,
.url: "../\(language).html"
.url: ".." + Element.htmlPagePathAddition(for: language)
]
return backNavigation.generate(content)
}