Fix language button url
This commit is contained in:
parent
e291fbec52
commit
431a953b03
@ -17,7 +17,11 @@ final class PostListPageGenerator {
|
||||
}
|
||||
|
||||
private func pageUrl(in language: ContentLanguage, pageNumber: Int) -> String {
|
||||
let base = source.content.settings.general.url + source.pageUrlPrefix(for: language)
|
||||
source.content.settings.general.url + pageUrlWithoutDomain(in: language, pageNumber: pageNumber)
|
||||
}
|
||||
|
||||
private func pageUrlWithoutDomain(in language: ContentLanguage, pageNumber: Int) -> String {
|
||||
let base = source.pageUrlPrefix(for: language)
|
||||
guard pageNumber > 1 else {
|
||||
return base
|
||||
}
|
||||
@ -99,7 +103,7 @@ final class PostListPageGenerator {
|
||||
let feedPageGenerator = FeedPageGenerator(content: source.content, results: source.results)
|
||||
|
||||
// Includes leading slash
|
||||
let languageButtonUrl = pageUrl(in: language.next, pageNumber: pageIndex)
|
||||
let languageButtonUrl = pageUrlWithoutDomain(in: language.next, pageNumber: pageIndex)
|
||||
|
||||
// Includes leading slash
|
||||
let pageUrl = pageUrl(in: language, pageNumber: pageIndex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user