Don't link draft pages
This commit is contained in:
parent
82c40cc080
commit
e02bfd17d2
@ -54,8 +54,9 @@ final class PostListPageGenerator {
|
||||
private func makePostData(post: Post) -> FeedEntryData {
|
||||
let localized: LocalizedPost = post.localized(in: language)
|
||||
|
||||
let linkUrl = post.linkedPage.map {
|
||||
FeedEntryData.Link(
|
||||
let linkUrl: FeedEntryData.Link? = post.linkedPage.map {
|
||||
guard !$0.isDraft else { return nil }
|
||||
return .init(
|
||||
url: $0.absoluteUrl(in: language),
|
||||
text: localized.pageLinkText ?? post.content.settings.posts.localized(in: language).defaultPageLinkText)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user