sigildocs

(sigil docs packages)

(sigil docs packages) - Package Documentation Discovery

Discovers and indexes hand-written reference documentation from packages. Package docs live in lib/_pkg/<name>/ and contain markdown files with blockquote summaries for indexing.

Example: (list-packages) => (("sigil-stdlib" . "0.0.0") ("sigil-json" . "0.0.0") ...)

(list-package-docs "sigil-stdlib") => (("language/syntax.md" . "Expressions, literals, and comments.") ("style/naming.md" . "Naming conventions for Sigil code."))

(read-package-doc "sigil-stdlib" "language/syntax.md") => "# Syntaxnn> Expressions, literals, and comments.nn..."

Exports

Clear the package documentation cache.

Use this to force rediscovery after docs have been regenerated.

list-packagesprocedure

List all packages that have documentation.

Returns an association list of (name . version) pairs.

Check if a package exists and has documentation.

Extract a blockquote summary from a markdown file.

Looks for a blockquote starting with > at the beginning of the file (after any heading). Returns the combined text of the blockquote lines, or #f if no blockquote is found.

List documentation files for a package.

Returns an association list of (file-path . summary) pairs. Summary is extracted from the blockquote at the start of each file.

List all package documentation files across all packages.

Returns a list of (package-name file-path summary) tuples.

Read a package documentation file.

Returns the file contents as a string, or #f if not found.