Core engine for the Nous documentation pipeline: parsing, inference, rendering, and build orchestration.
npm install @nousdev/coreimport { buildAll, inferAll, generateSidebar } from '@nousdev/core';
import { createMarkdownParser } from '@nousdev/parser-md';
import { createHtmlRenderer } from '@nousdev/renderer-html';
const result = await buildAll({
contentDir: './docs',
outDir: './dist',
baseUrl: '/',
parsers: [createMarkdownParser()],
renderer: createHtmlRenderer(),
plugins: [],
config: {},
});
// Generate sidebar navigation from parsed documents
const sidebar = generateSidebar(result.documents, '/');buildAll(options)-- full pipeline: parse, infer, transform, render; returnsBuildResultbuildEngine(options)-- engine-only pipeline: parse, infer, transform (no rendering)parseAll(options)-- parse all source files into aMap<string, DocumentNode>renderAll(options)-- render pre-parsed NDM documents to HTML
inferAll(documents)-- run all inference passes on a document setinferDocumentAnnotations(doc)-- infer block-level annotations for a single documentinferType(doc)-- classify document type (guide, reference, tutorial, etc.)inferAudience(doc)-- determine target audience from content signalsinferAnswers(doc)-- extract question-answer pairs from document content
generateSidebar(documents, baseUrl)-- produce a sidebar tree from document metadatabuildBreadcrumbs(filePath, documents)-- generate breadcrumb trail for a given path
tabGroupTransform-- built-in transform that groups consecutive tab blocks intoTabGroupNode
slugify(text)-- convert text to a URL-safe slugresolveAndDiff(original, proposed)-- compute a structured diff for suggested edits
PipelineOptions,BuildResult,PageResult,BuildErrorSidebarEntry,BreadcrumbItemProposedChange,AdaptationReportInput
MIT