Fix page paths

Update PostListPageGenerator.swift
This commit is contained in:
Christoph Hagen
2025-01-07 10:31:46 +01:00
parent f8150e0809
commit dd2b7d6cd2
7 changed files with 31 additions and 8 deletions

View File

@ -23,7 +23,14 @@ struct FeedGeneratorSource: PostListPageGeneratorSource {
content.settings.localized(in: language).description
}
/**
The url to the page, including a leading slash
*/
func pageUrlPrefix(for language: ContentLanguage) -> String {
content.settings.localized(in: language).feedUrlPrefix
let prefix = content.settings.localized(in: language).feedUrlPrefix
if prefix.hasPrefix( "/" ) {
return prefix
}
return "/" + prefix
}
}