Changelog
module Changelog| Assembly | Nacara.Plugin.Changelog |
| Attributes | [<RequireQualifiedAccess>] |
Functions and values
collection<'FrontMatter> (name: string) (decoder: Decoder<'FrontMatter>) (sources: ChangelogSource list) : Collection<'FrontMatter>
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 | |
|---|---|
name | What you call the collection, and what a menu refers to it by. |
decoder | Reads the front matter the plugin writes into the site's own type. |
sources | One entry per package. Each becomes a page, named by its label and routed by its slug. |
create () : IPlugin
create () : IPluginThe styling of changelog pages. The collection produces the pages.
createWith (section: string) (sources: ChangelogSource list) : IPlugin
createWith (section: string) (sources: ChangelogSource list) : IPluginThe styling, plus a menu built from the changelogs you publish.
| Parameter | |
|---|---|
section | The collection's name, which is the section the menu is for. |
sources | The same changelogs you gave the collection. |
registerWith (section: string) (sources: ChangelogSource list) (site: Site) : Site
registerWith (section: string) (sources: ChangelogSource list) (site: Site) : SiteAdds the styling, and lets the plugin offer the menu for the section.
| Parameter | |
|---|---|
section | The collection's name. |
sources | The same changelogs you gave the collection. |
site | The site you are describing. |
toMarkdown (label: string) (document: ChangelogDocument) : string
toMarkdown (label: string) (document: ChangelogDocument) : stringTurn 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 | |
|---|---|
label | The page's title. |
document | The parsed changelog. A file with no version heading is published whole rather than as a blank page. |