
struct FeedGeneratorSource: PostListPageGeneratorSource {

    let language: ContentLanguage
    
    let content: Content
    
    let results: PageGenerationResults
    
    var showTitle: Bool {
        false
    }

    var postsPerPage: Int {
        content.settings.posts.postsPerPage
    }

    var pageTitle: String {
        content.settings.localized(in: language).title
    }

    var pageDescription: String {
        content.settings.localized(in: language).description
    }

    func pageUrlPrefix(for language: ContentLanguage) -> String {
        content.settings.localized(in: language).feedUrlPrefix
    }
}
