Skip to content
ZenithDocs
English

Kitchen sink

Every element ZenithDocs can render, on a single page.

On this page

This page uses every Markdown feature and component available in ZenithDocs. Use it to check a theme at a glance.

Theme

Switch the accent preset to preview it on this page. Use the button in the header to toggle dark mode.

Backdrop styles, drawn behind the top of the page. Scroll back up after switching.

Typography

A regular paragraph with bold, italic, bold italic, strikethrough, inline code, highlighted text, CSS, H2O and E = mc2. Press Ctrl + Shift + P to open the command palette.

Links can point to another page, to a section of this page, or to an external site. Bare URLs are linked too: https://lumosframework.com.

A second paragraph follows, long enough to wrap on several lines, so you can judge the line height and measure of body text. Good documentation reads like a conversation: short sentences, concrete examples and a clear structure make it easy to skim.

Heading level 3

Heading level 4

Heading level 5
Heading level 6

Heading with a custom id

This heading uses [#custom-anchor] to set its id.

Lists

  • Unordered item
  • Item with formatting and code
    • Nested item
    • Another nested item
      • Third level
  • Last item
  1. First step
  2. Second step
    1. Nested ordered item
    2. Another one
  3. Third step
  • Completed task
  • Another completed task
  • Pending task

Blockquote

Documentation is a love letter that you write to your future self.

It can span several paragraphs, and contain code or formatting.

Table

Left aligned Centered Right aligned
Search Yes Static index with Pagefind
i18n Yes Several languages, with a fallback
llms.txt Yes Markdown output for LLMs
Playground No Out of scope for a static site

Image

A mountain range under a dusk sky

Details

Native details element

Raw HTML works in MDX, including <details>.

Horizontal rule

Content above the rule.


Content below the rule.

Callouts

Directives

GitHub alerts

GitHub alerts are a Markdown extension supported on GitHub: a blockquote starting with [!TYPE]. ZenithDocs renders them as callouts, so the same file looks right both on GitHub and on your site. Each of the five alert types has its own style.

Component

Code blocks

A code block without a language.
src/greet.ts
interface Options {
  name: string;
  excited?: boolean;
}

export function greet({ name, excited = false }: Options): string {
  return `Hello, ${name}${excited ? '!' : '.'}`;
}
const first = 'meta highlight';
const second = 'this line is highlighted from the meta';
const third = 'back to normal';
const regular = true;
const important = true;
const alsoRegular = true;
import zenith from 'zenith-docs';
export default { integrations: [zenith({ title: 'Docs' })] };
astro.config.mjs
export default defineConfig({
  integrations: [
    starlight({ title: 'Docs' }),
    zenith({ title: 'Docs' }),
  ],
});
.card {
  padding: 1rem;
  border-radius: var(--radius-main);
  background: var(--background-2);
}
package.json
{
  "name": "my-docs",
  "type": "module",
  "scripts": {
    "dev": "astro dev",
    "build": "astro build"
  }
}
src/components/Hello.astro
---
const { name } = Astro.props;
---

<p class="hello">Hello, {name}!</p>

<style>
  .hello { color: var(--accent); }
</style>
title: Kitchen sink
sidebar:
  label: Every element
  hidden: false
npx zenith build && npx zenith preview --open
const aVeryLongLine = 'This line is deliberately long so that the code block has to scroll horizontally instead of wrapping, which keeps the code readable.';

Cards

Tabs

npm

npm install github:AymericChaverot/zenith-docs

pnpm

pnpm add github:AymericChaverot/zenith-docs

npm

This set follows the one above, and the choice is remembered across pages, including the installation page.

pnpm

Selected pnpm.

Rich content

Tabs can hold any content, like lists:

  • One
  • Two

Built from values

Without items, the tab list is built from each <Tab> value.

Steps

Install

Add the package to your project.

Configure

Register the integration in astro.config.mjs.

Write

Create your first page in src/content/docs.

Accordions

Grouped: only one opens at a time

Opening another accordion of the group closes this one.

Second item of the group

Accordions are native <details> elements.

Third item of the group

No JavaScript involved.

A standalone accordion

Accordions can also be used on their own.

Files

apps
docs
src
content
index.mdx
content.config.ts
astro.config.mjs
package.json
pnpm-workspace.yaml

Icons

Built-in icons can be used anywhere with the Icon component:

Footnotes

ZenithDocs builds on Lumos1 and Astro2.

Footnotes

  1. A CSS framework built around design tokens and cascade layers. ↩

  2. A web framework for content-driven websites. ↩

Last updated on