Skip to content

Changelog

module Changelog
AssemblyNacara.Plugin.Changelog
Attributes[<RequireQualifiedAccess>]

Functions and values

collection<'FrontMatter> (name: string) (decoder: Decoder<'FrontMatter>) (sources: ChangelogSource list) : Collection<'FrontMatter>

A collection whose pages are generated from changelog files.

The front-matter type and the layout come from the site, so the pages look exactly like every other page of the site and the plugin stays independent of any theme.

Parameter
nameWhat you call the collection, and what a menu refers to it by.
decoderReads the front matter the plugin writes into the site's own type.
sourcesOne entry per package. Each becomes a page, named by its label and routed by its slug.
create () : IPlugin

The styling of changelog pages. The collection produces the pages.

createWith (section: string) (sources: ChangelogSource list) : IPlugin

The styling, plus a menu built from the changelogs you publish.

Parameter
sectionThe collection's name, which is the section the menu is for.
sourcesThe same changelogs you gave the collection.
menu (section: string) (sources: ChangelogSource list) : MenuOutline

Builds the menu for a section from the changelogs it publishes.

The sources are the menu: changelogs with a group are listed together under a heading with that name, in the order the groups first appear, and the rest where you declared them. A menu the site writes for the section is used instead.

Parameter
sectionName of the section this menu is for - the collection's name.
sourcesThe changelogs the collection publishes.
register (site: Site) : Site

Add changelog styling to a site.

registerWith (section: string) (sources: ChangelogSource list) (site: Site) : Site

Adds the styling, and lets the plugin offer the menu for the section.

Parameter
sectionThe collection's name.
sourcesThe same changelogs you gave the collection.
siteThe site you are describing.
toMarkdown (label: string) (document: ChangelogDocument) : string

Turn a parsed changelog into a page, versions only.

Everything above the first version - front matter, title, the note about Keep a Changelog - is left out. What is kept goes through unchanged, so a version's markdown gets the same highlighting, link resolution and anchors as any hand-written page.

Parameter
labelThe page's title.
documentThe parsed changelog. A file with no version heading is published whole rather than as a blank page.