Documentation
¶
Overview ¶
Package docsview serves a read-only, Obsidian-style viewer for a repository's documentation directory. Markdown renders on the server; the browser adds navigation, search, the graph, Mermaid, KaTeX, and drawings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Root is the repository directory. Only paths below it are served.
Root string
// Vaults are the note directories relative to Root, such as "docs" and
// "openspec". Together they form the vault. The first holds the home note.
Vaults []string
// Assets is a verified directory of pinned browser assets.
Assets string
// AssetFiles lists the servable "name/path" entries under Assets.
AssetFiles map[string]bool
// AssetVersion is an immutable URL segment for Assets.
AssetVersion string
// Theme is the path of a theme stylesheet, absolute or relative to Root,
// or "" for the built-in theme. Pages load it before viewer.css. The
// .css and .woff2 files below its directory are served, so the
// stylesheet can import the files next to it.
Theme string
// Poll is the interval of the live-reload poll loop. Zero selects 500 ms.
Poll time.Duration
// SpecVault is the vault of OpenAPI specs, or "". Its YAML files render
// as API reference pages.
SpecVault string
}
Config selects the repository, the vault directories inside it, and verified assets.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves the viewer. It is safe for concurrent use.
func New ¶
New opens the repository and asset roots. Each vault directory must exist, and no vault directory can contain another.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package linediff compares two sequences of strings with the Myers O(ND) algorithm in linear space.
|
Package linediff compares two sequences of strings with the Myers O(ND) algorithm in linear space. |
|
Package markdown renders repository Markdown with the Obsidian syntax that the documentation viewer supports.
|
Package markdown renders repository Markdown with the Obsidian syntax that the documentation viewer supports. |