Structure

PartitionedRenderingContext

struct PartitionedRenderingContext<T, M> where T : Comparable, T : CustomStringConvertible, T : Sendable, M : Metadata

The rendering context passed to a partitionedWriter(_:output:paginate:paginatedOutput:partitioner:) renderer, as well as the convenience tagWriter(_:output:paginate:paginatedOutput:tags:) and yearWriter(_:output:paginate:paginatedOutput:) renderers.

Contains items grouped by a partition key (such as a tag or year), optionally paginated.

Instance Properties

let allItems: [any AnyItem]

All items across all registered processing steps. When i18n is configured, this only contains items for the current locale.

let items: [Item<M>]

The items in this partition (or the current page’s slice when paginated), in sorted order.

let key: T

The partition key for this group of items.

let locale: SagaLocale?

The locale of this rendering context, or nil when i18n is not configured.

let outputPath: Path

The output path of the page being rendered.

let paginator: Paginator?

Pagination information, or nil if the writer is not paginated.

let subfolder: Path?

The subfolder name when using nested:. Nil otherwise.

let translations: [SagaLocale : String]

URLs for this page in other locales.

Instance Methods

func asDictionary() -> [String : Any]

Relationships

Conforms To

AtomContext , DictRenderingContext , Swift.Copyable , Swift.Sendable