Skip to content

losol/lectio-docs

Repository files navigation

Lectio Docs

Lectio — Latin, "a reading."

A headless, framework-agnostic toolkit for collecting documentation scattered across a repository — guides, READMEs, app docs — into one content source, with full-text search. Any host app embeds it and renders the content itself.

Lectio is not a site generator. Routing, rendering and theming stay with the host. Its job is the part nobody else does well: gathering scattered monorepo docs into one content tree, plus search.

Packages

Package What it is
@eventuras/lectio-docs The toolkit: collector, content source, search index. Vanilla TS/Node — no React.
@eventuras/lectio-docs-react React bindings: a headless search hook, plus an optional styled component.

How the pieces fit

docs/**  libs/*/README.md  apps/*/docs      … your scattered markdown
   │
   │  collect()                             build time, Node
   ▼
output dir: collected .md + manifest.json   one content tree
   │
   │  createContentSource({ manifest, loadBody })
   ▼                                        pure TS — the host injects how
getTree / getPages / getPage                bodies load (fs, fetch, bundler)
                                            and renders however it likes

buildSearchIndex()  →  search-index.json  →  OramaProvider + useDocsSearch

The framework-agnostic seam is deliberate: collect() runs in Node at build time and emits a manifest; the content source is pure TypeScript; the host decides how bodies are loaded — fs in Node, fetch in a SPA, import.meta.glob with a bundler. Lectio never knows which framework it runs in.

Reference site

apps/site-builder collects this repository's own docs/ tree, renders it with React Router, prerenders to static HTML, and deploys to Cloudflare — live at lectio.losol.no. It doubles as the proof that the toolkit stays framework-agnostic, and is the same app the lectio CLI ships and materializes for other repos — one source, no template to keep in sync.

Development

pnpm install
pnpm -r build                     # core → react bindings → app (topological)
pnpm --filter lectio-docs dev     # collect docs/ and serve the site locally

Releases are managed with changesets: add one with pnpm changeset, and merging the generated version PR publishes.

License

MIT © Losol AS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages