Documentation that belongs in your app.
Doqs adds a Markdown-driven documentation region to the Angular and Analog.js application you already have. Server-rendered and statically generated, with your branding, your routes and your Angular components left exactly where they are.
What Doqs 0.4 does
Angular components inside Markdown
New in 0.3 Register your own standalone components once, then place them between paragraphs with a one-line ::demo[id] directive. Interactive, server-rendered and hydrated.
Native Angular and Analog.js
Routes come from doqRoutes() and content from Analog’s own content files. Your router and providers stay yours.
Rich Markdown pages
Frontmatter, nested folders and custom slugs, plus built-in callouts, accessible tabs, step guides and titled code, all in plain Markdown.
SSR and SSG
doqPrerenderRoutes() feeds Analog’s prerenderer, so every page ships as static HTML and hydrates cleanly.
Sidebar and table of contents
Grouped navigation, an “On this page” index, previous and next links and a mobile drawer.
Pagefind full-text search
Optional and static: an index built from your prerendered output. No backend, off by default.
Host-owned themes and layout
Restyle with --host-docs-* CSS tokens. Doqs sets no global html or body styles.
Consumer-owned demos
Components belong to your app. A demo frontmatter key still attaches one to the end of a page.
Composition slots
Add your own standalone components after the docs index intro or after every document.
Getting started
Doqs plugs into an Analog app. Analog keeps its own configuration; Doqs adds its own. The two are separate on purpose.
pnpm add @doqs/analog @analogjs/content @analogjs/router prismjs// shared by vite.config.ts, so no Angular components here
export const doqPaths = { contentDirectory: 'docs', basePath: '/docs' } as const; Import @doqs/analog/styles.css once in your global stylesheet. The complete guide lives in the package README.
How it works
Install Doqs
Add the package next to Analog’s content packages.
Configure the documentation region
Share the paths, prerender with Analog and register Doqs in your app config.
Write Markdown
Drop files into src/content/docs. Routes, sidebar and table of contents follow. Add ::demo[id] lines where a live component belongs.
Build and deploy
vite build prerenders everything to static files you can host anywhere.
Doqs is not MDX: there is no JavaScript in Markdown and no template compilation. A directive only names a component your application registered.
Interactive components in Markdown
Put a line containing only ::demo[id] where a live Angular component belongs. Directives inside code fences, lists and quotes stay literal text, an unknown id shows a short notice instead of breaking the page, and headings, the table of contents and search keep working around every component. The component is yours: you register it, Doqs only places it.
Markdown
---
title: Getting started
---
## Installation
Pick a package manager and copy the command:
::demo[install-command]
## Try it
::demo[enter-animation]
The text after a demo is still ordinary, searchable Markdown.Rendered
Preview shows the fade-up animation.