Period Data Source
7 min
overview the period data source generates a list of time periods — years or months — derived from the publication dates of issues in the catalog api it enables archive navigation by letting users browse issues organized by when they were published when to use this use period when building an archive or back issue browser where users navigate by year or month the list of periods is calculated dynamically from actual issue publication dates basic example { "type" "period", "contextkey" "archiveyears", "interval" "year", "issuefilter" { "publication" { "id" { "value" "\ publicationid" } } } } live example view /examples/datasources/period configuration type specific properties property type default description interval 'year' | 'month' 'year' granularity of the generated periods issuefilter object — filters which issues are used to derive the periods order 'asc' | 'desc' 'desc' order in which periods are returned startoffset number 0 subtract this many intervals from the current date to define the start of the range format object — customize display labels — { formattext, translatewithkeys? } for common properties ( contextkey , limit , batchsize , etc ) see todo insert link to data sources overview link issuefilter properties scopes which issues are considered when generating periods uses storefrontissuefilter filter key type description publication publicationfilter scope to a specific publication — use publication id publicationdate datefilter restrict to issues published within a date range supports and , or , and condition item structure each generated item contains field type description year number the year of the period month number the month (1–12), only present when interval is month label string human readable label (e g "2024" or "january 2024" ) testing notes / edge cases no issues = no periods if a publication has no published issues the list is empty interval default is year omitting it generates year level periods, not months order default is desc periods are newest first set "asc" to reverse gaps in publishing months/years without published issues do not appear in the list related topics todo insert link to data sources overview linktodo insert link to content data source link