Documentation
¶
Overview ¶
Command selfdoc: Static Site Generator that builds a project's documentation site directly from its source code, so the docs can never drift from the code they describe, with SEO/AEO, first-class blog, search, and cross-project linking built in.
All of that ships as one binary, which builds the site, checks it, and publishes it.
The entry point is the module root, so the binary installs with "go install github.com/stricttools/selfdoc@v0" and takes its name from the module's last path element. Every engine package lives under internal/, and the command tree -- with the language extractors every code directive is resolved through -- is registered by internal/cli.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
address
Package address is the single addressing authority for built pages.
|
Package address is the single addressing authority for built pages. |
|
blog/assembly
Package assembly carries the assembly's operations: the deploy workflow it generates, the dispatches it sends, the build-and-graft body that deploy runs, and the two publishers that write into it without cloning it.
|
Package assembly carries the assembly's operations: the deploy workflow it generates, the dispatches it sends, the build-and-graft body that deploy runs, and the two publishers that write into it without cloning it. |
|
blog/assembly/fakegh
Package fakegh is the fake gh the assembly suite puts at the front of PATH.
|
Package fakegh is the fake gh the assembly suite puts at the front of PATH. |
|
blog/assembly/fakeghcmd
command
Command fakeghcmd is the executable the assembly suite installs as "gh" at the front of PATH.
|
Command fakeghcmd is the executable the assembly suite installs as "gh" at the front of PATH. |
|
blog/chrome
Package chrome is the assembly's one set of page-chrome assets.
|
Package chrome is the assembly's one set of page-chrome assets. |
|
blog/editor
Package editor is the authoring app's local server: registry, documents, preview, stream.
|
Package editor is the authoring app's local server: registry, documents, preview, stream. |
|
blog/editor/assets
Package assets decides where the editor's front-end comes from, declared rather than discovered.
|
Package assets decides where the editor's front-end comes from, declared rather than discovered. |
|
blog/editor/registry
Package registry reads the authoring app's repository registry: a hand-written TOML file.
|
Package registry reads the authoring app's repository registry: a hand-written TOML file. |
|
blog/listing
Package listing carries the home project's curated project listing: one declared source, two renderings.
|
Package listing carries the home project's curated project listing: one declared source, two renderings. |
|
blog/posts
Package posts discovers and validates a project's blog posts.
|
Package posts discovers and validates a project's blog posts. |
|
blog/preview
Package preview builds the whole assembly from local checkouts and serves it on loopback.
|
Package preview builds the whole assembly from local checkouts and serves it on loopback. |
|
blog/serving
Package serving carries the static-file primitives shared by the two local servers.
|
Package serving carries the static-file primitives shared by the two local servers. |
|
blog/shared
Package shared generates the elements of an assembled documentation site that belong to the site rather than to any one project.
|
Package shared generates the elements of an assembled documentation site that belong to the site rather than to any one project. |
|
blog/site
Package site carries the assembly's model: what the unified documentation site declares, what each project published into it, and where a build's output lands once it is grafted in.
|
Package site carries the assembly's model: what the unified documentation site declares, what each project published into it, and where a build's output lands once it is grafted in. |
|
blog/sitedirectives
Package sitedirectives carries the site-level directives: the generated parts of the home project's authored pages.
|
Package sitedirectives carries the site-level directives: the generated parts of the home project's authored pages. |
|
blog/unified
Package unified builds one documentation site out of several constituent projects plus a docs-site's own cross-cutting content.
|
Package unified builds one documentation site out of several constituent projects plus a docs-site's own cross-cutting content. |
|
blog/unifiedcheck
Package unifiedcheck checks every constituent project of a unified documentation site in one pass.
|
Package unifiedcheck checks every constituent project of a unified documentation site in one pass. |
|
blog/verify
Package verify answers whether a built assembly tree is fit to deploy.
|
Package verify answers whether a built assembly tree is fit to deploy. |
|
build
Package build is the build pipeline: it walks a project's docs templates, resolves their directives, wraps each page in its chrome, and writes a whole static site under the configured output directory.
|
Package build is the build pipeline: it walks a project's docs templates, resolves their directives, wraps each page in its chrome, and writes a whole static site under the configured output directory. |
|
catalog
Package catalog is selfdoc's directive catalogue: every built-in directive name and its status.
|
Package catalog is selfdoc's directive catalogue: every built-in directive name and its status. |
|
check
Package check validates a project's documentation: every directive resolves, every public symbol is covered, and every lint rule holds.
|
Package check validates a project's documentation: every directive resolves, every public symbol is covered, and every lint rule holds. |
|
cli
Package cli registers selfdoc's whole command tree on one strictcli application.
|
Package cli registers selfdoc's whole command tree on one strictcli application. |
|
cli/faketool
Package faketool is the fake external tool the cli suite puts at the front of PATH under whatever names a test asks for -- "gh", "npx", and so on.
|
Package faketool is the fake external tool the cli suite puts at the front of PATH under whatever names a test asks for -- "gh", "npx", and so on. |
|
cli/faketoolcmd
command
Command faketoolcmd is the executable the cli suite installs at the front of PATH under each external tool's name.
|
Command faketoolcmd is the executable the cli suite installs at the front of PATH under each external tool's name. |
|
config
Package config loads and validates a project's selfdoc.json.
|
Package config loads and validates a project's selfdoc.json. |
|
content
Package content resolves the content directives: the ones that need no language extractor.
|
Package content resolves the content directives: the ones that need no language extractor. |
|
cv
Package cv holds the CV as data: one declared document, rendered as a page and as a Person.
|
Package cv holds the CV as data: one declared document, rendered as a page and as a Person. |
|
deploy
Package deploy publishes a built documentation site.
|
Package deploy publishes a built documentation site. |
|
directives
Package directives is selfdoc's structured-marker parser.
|
Package directives is selfdoc's structured-marker parser. |
|
docs
Package docs is the shared resolution pipeline for a project's docs/ templates: it walks the docs directory, parses each page's frontmatter, and resolves every directive the page carries.
|
Package docs is the shared resolution pipeline for a project's docs/ templates: it walks the docs directory, parses each page's frontmatter, and resolves every directive the page carries. |
|
e2e
Package e2e is the rendered-reality suite: the built site, in a real browser, asserted as painted.
|
Package e2e is the rendered-reality suite: the built site, in a real browser, asserted as painted. |
|
effects
Package effects is the single authorized surface for effectful calls in selfdoc production code.
|
Package effects is the single authorized surface for effectful calls in selfdoc production code. |
|
excludes
Package excludes is the single authority for which source paths a project's docs cover.
|
Package excludes is the single authority for which source paths a project's docs cover. |
|
extractors
Package extractors defines the language-extractor protocol, the shared behavior every extractor embeds, and the registry that resolves a language name to its extractor.
|
Package extractors defines the language-extractor protocol, the shared behavior every extractor embeds, and the registry that resolves a language name to its extractor. |
|
extractors/dart
Package dart resolves selfdoc's directives against Dart source.
|
Package dart resolves selfdoc's directives against Dart source. |
|
extractors/golang
Package golang resolves selfdoc's directives against Go source.
|
Package golang resolves selfdoc's directives against Go source. |
|
extractors/kotlin
Package kotlin resolves selfdoc's directives against Kotlin source.
|
Package kotlin resolves selfdoc's directives against Kotlin source. |
|
extractors/python
Package python resolves selfdoc's directives against Python source.
|
Package python resolves selfdoc's directives against Python source. |
|
extractors/sql
Package sql resolves selfdoc's directives against PostgreSQL DDL.
|
Package sql resolves selfdoc's directives against PostgreSQL DDL. |
|
extractors/svelte
Package svelte reads Svelte component source for selfdoc.
|
Package svelte reads Svelte component source for selfdoc. |
|
extractors/swift
Package swift resolves selfdoc's directives against Swift source.
|
Package swift resolves selfdoc's directives against Swift source. |
|
extractors/typescript
Package typescript reads TypeScript and JavaScript source for selfdoc.
|
Package typescript reads TypeScript and JavaScript source for selfdoc. |
|
extractors/zig
Package zig reads Zig source for selfdoc.
|
Package zig reads Zig source for selfdoc. |
|
fleet
Package fleet enumerates the selfdoc projects that live beside this one.
|
Package fleet enumerates the selfdoc projects that live beside this one. |
|
gen
Package gen auto-generates documentation pages from a project's structure.
|
Package gen auto-generates documentation pages from a project's structure. |
|
gendata
Package gendata generates data files by running sandboxed scripts via bubblewrap (bwrap).
|
Package gendata generates data files by running sandboxed scripts via bubblewrap (bwrap). |
|
gitcommit
Package gitcommit commits the files a selfdoc command generated.
|
Package gitcommit commits the files a selfdoc command generated. |
|
html
Package html converts Markdown to the HTML a built page's body carries.
|
Package html converts Markdown to the HTML a built page's body carries. |
|
icons
Package icons provides the language icons drawn beside a code block's language label.
|
Package icons provides the language icons drawn beside a code block's language label. |
|
identity
Package identity holds the site's declared author, as the one Person its structured data names.
|
Package identity holds the site's declared author, as the one Person its structured data names. |
|
js
Package js carries the browser scripts a built page ships and assembles the body bundle each page needs.
|
Package js carries the browser scripts a built page ships and assembles the body bundle each page needs. |
|
layout
Package layout is selfdoc's declaration of the per-repository directories it owns, and the single authority for every path it reads or writes inside them.
|
Package layout is selfdoc's declaration of the per-repository directories it owns, and the single authority for every path it reads or writes inside them. |
|
lints
Package lints owns the lint-code registry and the verdict rules every check entry point shares.
|
Package lints owns the lint-code registry and the verdict rules every check entry point shares. |
|
manifest
Package manifest generates and reads a project's manifest: the JSON record of what a build published -- the project's identity and version, its pages with their heading anchors, and its posts.
|
Package manifest generates and reads a project's manifest: the JSON record of what a build published -- the project's identity and version, its pages with their heading anchors, and its posts. |
|
ownership
Package ownership decides whether a generated page's frontmatter description is machine-owned -- a placeholder selfdoc emitted and may freely overwrite -- or handwritten, and must never be overwritten.
|
Package ownership decides whether a generated page's frontmatter description is machine-owned -- a placeholder selfdoc emitted and may freely overwrite -- or handwritten, and must never be overwritten. |
|
page
Package page builds the chrome a converted Markdown body is wrapped in.
|
Package page builds the chrome a converted Markdown body is wrapped in. |
|
payloadschemas
Package payloadschemas declares the JSON Schemas of selfdoc's machine-mode payloads.
|
Package payloadschemas declares the JSON Schemas of selfdoc's machine-mode payloads. |
|
prose
Package prose holds the shared unit-pickers that extract complete linguistic units from text.
|
Package prose holds the shared unit-pickers that extract complete linguistic units from text. |
|
quality
Package quality scores a project's documentation: a maturity tier (0-5) and a content grade (A-F).
|
Package quality scores a project's documentation: a maturity tier (0-5) and a content grade (A-F). |
|
render
Package render renders a page from content held in memory, writing nothing.
|
Package render renders a page from content held in memory, writing nothing. |
|
resolution
Package resolution answers whether every reference a build emitted resolves to a file it wrote.
|
Package resolution answers whether every reference a build emitted resolves to a file it wrote. |
|
resolver
Package resolver dispatches one directive to whatever can answer it.
|
Package resolver dispatches one directive to whatever can answer it. |
|
revisions
Package revisions tracks post revisions in a sidecar revisions.json.
|
Package revisions tracks post revisions in a sidecar revisions.json. |
|
robots
Package robots holds the crawler policy, declared once for every robots.txt this repository writes.
|
Package robots holds the crawler policy, declared once for every robots.txt this repository writes. |
|
scripts
Package scripts declares selfdoc's hand-run maintenance scripts and renders the commands that fetch and run one.
|
Package scripts declares selfdoc's hand-run maintenance scripts and renders the commands that fetch and run one. |
|
spellcorpus
Package spellcorpus is the corpus-wide spelling run: the same engine, every sibling project.
|
Package spellcorpus is the corpus-wide spelling run: the same engine, every sibling project. |
|
spelling
Package spelling is the spelling engine: one word checker serving every surface that needs one.
|
Package spelling is the spelling engine: one word checker serving every surface that needs one. |
|
staleness
Package staleness detects descriptions that no longer describe what they sit on, by hashing what a description is about and comparing that hash against the one recorded the last time the description was written.
|
Package staleness detects descriptions that no longer describe what they sit on, by hashing what a description is about and comparing that hash against the one recorded the last time the description was written. |
|
strictclisupport
Package strictclisupport is first-class support for strictcli-based projects.
|
Package strictclisupport is first-class support for strictcli-based projects. |
|
tables
Package tables renders data as Markdown tables with per-column alignment, optional pretty-printing, and pipe escaping that leaves inline code alone.
|
Package tables renders data as Markdown tables with per-column alignment, optional pretty-printing, and pipe escaping that leaves inline code alone. |
|
testproject
Package testproject builds the fixture projects the engine's tests run against.
|
Package testproject builds the fixture projects the engine's tests run against. |
|
themes
Package themes is the theme registry: the stylesheets a built site can be painted with, and the metadata each one carries.
|
Package themes is the theme registry: the stylesheets a built site can be painted with, and the metadata each one carries. |
|
tokenizer
Package tokenizer is a standalone Markdown block tokenizer.
|
Package tokenizer is a standalone Markdown block tokenizer. |
|
urls
Package urls builds absolute URLs from relative paths, decoupling URL generation from a hardcoded base_url and supporting locale-prefixed and versioned paths.
|
Package urls builds absolute URLs from relative paths, decoupling URL generation from a hardcoded base_url and supporting locale-prefixed and versioned paths. |
|
util
Package util holds the small shared helpers the rest of selfdoc builds on: frontmatter parsing, project manifest and version detection, HTML escaping, path joining, date formatting, title casing, and the Python-compatible string, number and JSON spellings the emitted documents are pinned to.
|
Package util holds the small shared helpers the rest of selfdoc builds on: frontmatter parsing, project manifest and version detection, HTML escaping, path joining, date formatting, title casing, and the Python-compatible string, number and JSON spellings the emitted documents are pinned to. |
Click to show internal directories.
Click to hide internal directories.