(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-package-doc-cacheprocedureClear the package documentation cache.
Use this to force rediscovery after docs have been regenerated.
list-packagesprocedureList all packages that have documentation.
Returns an association list of (name . version) pairs.
package-exists?procedureCheck if a package exists and has documentation.
extract-blockquote-summaryprocedureExtract 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-package-docsprocedureList 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-docsprocedureList all package documentation files across all packages.
Returns a list of (package-name file-path summary) tuples.
read-package-docprocedureRead a package documentation file.
Returns the file contents as a string, or #f if not found.