Function
atomFeed(title:author:baseURL:summary:image:dateKeyPath:)
@preconcurrency
func atomFeed<Context, M>(
title: String,
author: String? = nil,
baseURL: URL,
summary: ((Item<M>) -> String?)? = nil,
image: ((Item<M>) -> String?)? = nil,
dateKeyPath: KeyPath<Item<M>, Date> = \.lastModified
) -> ((Context) -> String) where Context : AtomContext, M == Context.MA renderer which creates an Atom feed for Items
Parameters
titleThe title of the feed, usually your site title. Example: Loopwerk.io.
authorThe author of the articles.
baseURLThe base URL of your website, for example https://www.loopwerk.io.
summaryAn optional function which takes an
Itemand returns its summary.imageAn optional function which takes an
Itemand returns its image URL (absolute or relative to baseURL).dateKeyPathA keypath to the date property to use for the
field. Defaults to \.lastModified.
Return Value
A function which takes a rendering context, and returns a string.