Skip to content

Shipping

@teasim/astra

The content layer — navigation, validation, markdown twins, and the machine-readable routes.

npm install @teasim/astra
Target
Content layer
Renders
Nothing
Output
Routes and data

Surface

Everything that computes, and renders nothing.

Each part is meant to stay legible, reviewable, and easy to change later.

Schemas

Validation that names the page
A content schema runs in dev and reports the slug that is wrong rather than failing with a stack trace.

Navigation

One tree, built once
createNavigation turns a collection into a sidebar, breadcrumbs, and previous and next links.

Contents

Headings to a rail
getTOC turns a page's headings into the contents rail beside it, at whatever depth you ask for.

Markdown

A twin for every page
Each route is served twice — once as HTML for people, once as markdown for machines.

Machines

llms.txt without a plugin
The site publishes llms.txt and llms-full.txt from the same collection it renders from.

Boundary

Knows nothing about looks
It computes structure and returns data. What draws it is entirely your decision.

What it is

The half of a documentation site that has nothing to do with how it looks. It reads a content collection and computes the structure — the sidebar tree, the breadcrumb trail, the previous and next links, the table of contents.

Why it is separate

A content helper that also renders markup decides how your site is built. That is the second borrowed decision, and it is why computing is a separate package from rendering rather than shipped inside it. @teasim/astra renders nothing, and @teasim/astro and @teasim/aster know nothing about content. Either half works on its own.

Markdown twins

Every page is served twice: once as HTML for people, once as markdown for machines. /about has /about.md beside it, and the site publishes llms.txt and llms-full.txt so a model can read the whole thing without parsing your markup.

Validation that names the page

Schema problems are reported in dev with the slug that caused them. A missing title, a link that points nowhere, a prev that names a page that does not exist — each one is a console line naming the file, not a build failure.

Getting started

Three steps, and none of them is a migration.

  1. Describe the content

    A schema validates every entry in dev and names the page that is wrong, rather than failing at build time with a stack trace.

  2. Compute the navigation

    createNavigation turns a collection into a sidebar, breadcrumbs, and prev/next links, all bound to one tree built once.

  3. Serve the machine routes

    Every page gets a markdown twin, and the site gets llms.txt and llms-full.txt without another integration.

Next

Take the parts you need.

Every package stands on its own, and nothing here asks for the whole set.