Skip to content
Markdown · Astro Book

Markdown

Markdown pages combine plain text with a small set of formatting conventions. This page exercises the shared renderer; dedicated guides explain typography, code blocks, mathematics and diagrams in more detail.

Everyday Markdown

Use strong, emphasis, deleted text and inline code when they convey meaning. Links between these chapters are relative, so they remain beneath the site’s configured base path.

  • Write a short example.
  • Check it in the built site.
  • Add the next chapter.

Formulas

Inline math is rendered during the build: E=mc2E = mc^2. A configured macro works in xRx \in \RR.

01x2dx=13\int_0^1 x^2\,dx = \frac{1}{3}

Long formulas scroll within their container on small screens:

f(x1,x2,x3,x4,x5,x6,x7,x8)=i=18xi2+i=18(1+xi)+2fx1x2+2fx3x4f(x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8)=\sum_{i=1}^{8}x_i^2+\prod_{i=1}^{8}(1+x_i)+\frac{\partial^2 f}{\partial x_1\partial x_2}+\frac{\partial^2 f}{\partial x_3\partial x_4}

An intentional invalid command stays readable instead of breaking the page: \unknowncommandx\unknowncommand{x}.

Diagrams

flowchart LR
  Source[Markdown source] --> Build[Static Astro build]
  Build --> Math[KaTeX HTML]
  Build --> Diagram[Lazy Mermaid runtime]
  Math --> Reader[Reader]
  Diagram --> Reader

This deliberately invalid diagram demonstrates source fallback:

flowchart LR
  A[Unclosed label --> B

Highlighted code

interface Reader {
  name: string;
  interests: string[];
}
const reader: Reader = { name: 'Ada', interests: ['math', 'diagrams'] };
console.log(reader);

Wide tables

DocumentOwnerRevisionReviewedScopeRender strategyAvailability
Public guideExample authors122026-01-15Independent synthetic contentStatic HTML with optional client featuresNo account required
API referenceExample maintainers72026-02-20Consumer-supplied navigation and metadataBuild-time highlighting and mathPublic package

Raw HTML

Native HTML disclosure

Raw HTML remains available to trusted Markdown authors.

Image zoom

Click this synthetic, locally bundled SVG to open the theme image viewer.

Three connected blocks used as a local image zoom example

Independent diagram errors

Another malformed diagram keeps its own error message, without clearing the earlier example’s message:

sequenceDiagram
  invalid sequence syntax ???