API reference
The public declarations of @chrismichaelps/pudu-lang-docgen 0.1.0.
PuduLangDocgen.Api.Catalog
Ruletypean include or exclude decision for identities a pattern matches
Optionstypewhere reference pages go and which declarations they show
Options that show exported declarations under
apiwith default layouts.Rules of a filter file:
apiRuleslistingincludeorexcludeentries, each with auidRegexand an optionaltypeofModule,Type,Function,Constant, orMember.Declarations kept for publication: exported ones unless private ones are asked for, whose identity matches an include pattern when any is given and no exclude pattern.
The published path of a module or type page.
Identities of every module, declaration, field, variant, and method with its destination. Modules and types have pages; functions and constants are sections of their module page, and fields, variants, and methods sections of their type page.
Navigation of modules, each listing its types and traits, and its functions and constants when they have pages of their own. Items carry the identity they link to. Nested navigation groups modules under the modules their names extend.
A browser link to a declaration's source line, or the empty text without a pattern. The pattern names
\{path\}and\{line\}.The last dotted segment of an identity.
PuduLangDocgen.Api.Lexer
PuduLangDocgen.Api.Model
Parametertypeone named parameter and its written type
Membertypea declaration: function, type, trait, constant, field, variant, or method
Implementationtypea trait implemented for a type, with documented methods
Unittypeone module: its documentation, imports, declarations, and implementations
Whether a member kind names a type-like declaration with a page of its own.
The first paragraph of documentation text.
Documentation after its first paragraph.
PuduLangDocgen.Api.Pages
Contexttypeeverything reference pages link against
The module page and one page per type the module declares.
The display name of a member kind.
PuduLangDocgen.Api.Parser
The module declared in a source file at a project-relative path.
Tokens joined the way declarations are conventionally written.
PuduLangDocgen.Api.Sheet
Renderedtypethe rendered title, body, outline, and findings of a page
A page from an API page document:
title, optionallanguageId, and abodyof blocks namedh1–h6,api1–api4,markdown,code,facts,parameters,list, andinheritance. Unknown blocks are reported and skipped.
PuduLangDocgen.Build.Checks
Fragment links that name no element of their target page. Links to files other than pages are not checked for fragments; links to missing files were reported while rendering.
Every
idattribute value in HTML.Output paths that are not portable, collide ignoring case, or put a file where a folder is.
Diagnostics with configured levels applied:
offdrops a code,info,warning, anderrorset its severity, and withstrictevery remaining warning becomes an error.
PuduLangDocgen.Command
Runs a command line and answers its exit status: 0 success, 1 failed work, 2 invalid usage.
PuduLangDocgen.Command.Arguments
Parsedtypea command, its positional arguments, and its options
Command-line arguments read into a command, positional arguments, and options.
Help text listing commands and options.
Whether a flag was given.
The last value given for an option, or the fallback.
Every value given for an option, in order.
A configuration path; a folder names its
docgen.json.
PuduLangDocgen.Configuration
Mappingtypefiles matched by globs under a source folder, published under a destination
ApiSourcetypePudu sources documented as reference pages
Contributiontypethe repository behind edit links
Diagramstypehow PlantUML diagrams are drawn
Pdftypethe command that turns printable documents into PDF files
Configtypeeverything a build reads from the project configuration
LEVELS: Array[Str]constLevels a rule may assign to a diagnostic code.
Settings used when a configuration names nothing else.
A configuration read from JSON or YAML text; the file name decides the format and appears in every diagnostic.
PuduLangDocgen.Configuration.Fields
Readertypethe configuration file and the object being read
A configuration failure naming the dotted location of the value.
Every key of an object is one of the allowed names.
A reader for the object stored under a key; a missing key reads as empty.
Text under a key, or the fallback when it is missing.
A flag under a key, or the fallback when it is missing.
A list of text under a key; a single text counts as a list of one.
Readers for each object of a list under a key; a single object counts as a list of one.
A relative directory under a key: empty for the configuration folder, never leaving it.
A relative folder under a key that may start above the configuration folder with
../segments; the rest must be a portable relative path.
PuduLangDocgen.Configuration.Rules
Settingstypethe configuration values these rules judge
Change frequencies crawlers understand.
Failures of the rules as configuration diagnostics located by property path.
PuduLangDocgen.Constants.Codes
UNCLOSED_BLOCK: StrconstA code fence or math block runs to the end of its container.
INCLUDE_MISSING: StrconstAn included file is not part of the loaded files.
INCLUDE_CYCLE: StrconstFiles include one another in a cycle.
Content nests past the parser's depth bound and is kept as text.
EXCERPT_MISSING: StrconstA code excerpt names a file that is not loaded.
EXCERPT_INVALID: StrconstA code excerpt's region, range, or options cannot be applied.
UNKNOWN_ALERT: StrconstA quote names an alert kind that is not configured.
A container directive is unsupported or lacks a required attribute.
A YAML header is unclosed or not a mapping.
A container directive has no matching end line.
PATH_INVALID: StrconstAn include or excerpt path is absolute, encoded, or not portable.
A link destination uses a scheme or form that is never linked.
A local destination leaves the project root.
LINK_BROKEN: StrconstA local link names a file that is not published.
XREF_UNRESOLVED: StrconstA cross reference names an identity no page or map declares.
A link names a section its target page does not have.
IMAGE_MISSING: StrconstAn image names a file that is not published.
VIDEO_INSECURE: StrconstAn embedded video does not use HTTPS.
TOC_SYNTAX: StrconstA table of contents is not valid YAML or JSON.
TOC_SHAPE: StrconstA table of contents or one of its items has the wrong shape.
A Markdown table of contents heading has no title.
TOC_UNSAFE: StrconstA table of contents destination is unsafe.
TOC_TOO_DEEP: StrconstA table of contents nests past its depth bound.
A table of contents item declares an unknown field.
TOC_NAMELESS: StrconstA table of contents item has neither a name nor a uid.
TOC_UID_UNKNOWN: StrconstA table of contents item names an unknown uid.
A table of contents destination is not published.
TOC_CYCLE: StrconstTables of contents include one another in a cycle or too deeply.
UID_DUPLICATE: StrconstTwo pages declare the same uid.
A layout or partial template does not parse.
CONFIG_INVALID: StrconstA configuration value is missing, unknown, or of the wrong type.
A configuration file cannot be read or decoded.
A content file listed by the configuration cannot be read.
CONTENT_INVALID: StrconstA structured content file does not decode or describes an invalid interface.
A content file has a type the build does not publish.
An overwrite section header is malformed or names no uid.
OUTPUT_INVALID: StrconstAn output path is not portable.
Two outputs share a path, or a file takes a folder's path.
A configuration selects no content and no API sources.
FILE_UNREADABLE: StrconstA project file or folder cannot be read safely.
PUBLISH_FAILED: StrconstOutput could not be written, or a publication path is unsafe.
A cross-reference map could not be fetched or read.
TOOL_FAILED: StrconstAn external tool the command needs is missing or failed.
PuduLangDocgen.Constants.Package
NAME: StrconstThe package name shown in generated files and command output.
VERSION: StrconstThe package version recorded in every manifest.
CONFIG_FILE: StrconstThe configuration file a project folder is expected to hold.
STATE_FOLDER: StrconstThe folder beside the configuration holding build state between runs.
Template names built into the package: the default look, its static-navigation alias, and the extensions that split HTTP API pages by tag or by operation.
PuduLangDocgen.Docset
Optionstypecommand-line choices layered over the configuration
Loadedtypea project's folder and everything a build reads from it
Options that leave the configuration as written.
A project read from its configuration file with options applied.
A project built and, unless the run is dry, published incrementally.
The site built and published, then a PDF for every table of contents that sets
pdf. Unlikepdf, a missing renderer is a warning here, so sites build on machines without a browser.The site built and published, then a PDF for every table of contents that sets
pdf.API metadata written as files beside the configuration, in each source's format.
A digest of every project file's path and content outside the output folder, which changes whenever a source the build reads changes.
PuduLangDocgen.Docset.Publish
Writes a plan under an output folder. Files whose content matches the previous build's record are left untouched unless
forceis set; files the previous build wrote that this plan no longer has are removed. The record is kept in thestatefile.A text file replaced in one step: written beside its target with the usual file mode, then renamed over it, so readers never see a partial file. The folder is created when missing.
A binary file replaced in one step, like
place.
