Module

PuduLangDocgen.Build.Sources

View source

Project files mapped to outputs and read into typed documents

Types

Name Description
Document One content file read into the form its kind needs
Entry A content file, where it publishes, and its merged metadata
Read Every content file read, with tables of contents apart

Functions

Name Description
mapped Project files selected by mappings, each paired with its output path. A file matches when it lies under the mapping's source folder, a `files` glob matches its path inside that folder, and no `exclude` glob does. The output keeps that inner path under `dest`. Files under `skip` folders are never selected; the first mapping to select a file wins.
groupMeta Metadata that the group of a file's mapping gives it, by source path.
metadata Global metadata and file metadata rules from the configuration and the metadata files it names; later files override earlier values.
read Content files read by kind: Markdown articles and redirects, HTTP interface descriptions, structured API pages, and tables of contents. Metadata merges global values, then file metadata of the file's group, then file rules, then the file's own header, which wins.

mapped

fn mapped(mappings: &Array[Configuration.Mapping], paths: &Array[Str], skip: &Array[Str]) -> Array[(Str, Str)]

Project files selected by mappings, each paired with its output path. A file matches when it lies under the mapping's source folder, a files glob matches its path inside that folder, and no exclude glob does. The output keeps that inner path under dest. Files under skip folders are never selected; the first mapping to select a file wins.

Parameters

mappings
&Array[Configuration.Mapping]
paths
&Array[Str]
skip
&Array[Str]

Returns

Array[(Str, Str)]

View source

groupMeta

fn groupMeta(mappings: &Array[Configuration.Mapping], paths: &Array[Str], skip: &Array[Str]) -> Map[Str, Array[(Str, Docgen.Meta)]]

Metadata that the group of a file's mapping gives it, by source path.

Parameters

mappings
&Array[Configuration.Mapping]
paths
&Array[Str]
skip
&Array[Str]

Returns

Map[Str, Array[(Str, Docgen.Meta)]]

View source

metadata

fn metadata(config: &Configuration.Config, files: &Map[Str, Str]) -> (Array[(Str, Docgen.Meta)], Array[Meta.Rule], Array[Docgen.Diagnostic])

Global metadata and file metadata rules from the configuration and the metadata files it names; later files override earlier values.

Parameters

config
&Configuration.Config
files
&Map[Str, Str]

Returns

(Array[(Str, Docgen.Meta)], Array[Meta.Rule], Array[Docgen.Diagnostic])

View source

read

fn read(content: &Array[(Str, Str)], files: &Map[Str, Str], global: &Array[(Str, Docgen.Meta)], rules: &Array[Meta.Rule], alerts: &Array[Str], groups: &Map[Str, Array[(Str, Docgen.Meta)]]) -> Read

Content files read by kind: Markdown articles and redirects, HTTP interface descriptions, structured API pages, and tables of contents. Metadata merges global values, then file metadata of the file's group, then file rules, then the file's own header, which wins.

Parameters

content
&Array[(Str, Str)]
files
&Map[Str, Str]
global
&Array[(Str, Docgen.Meta)]
rules
&Array[Meta.Rule]
alerts
&Array[Str]
groups
&Map[Str, Array[(Str, Docgen.Meta)]]

Returns

Read

View source