Skip to content
Quillmark

Writing with MDX: a feature tour

Code blocks, math, callouts, tables and more: everything a Quillmark post can do.

MC
Michael Chen
JW
James Wilson
October 28, 20262 min read

Posts are written in MDX: Markdown with the option to use components. This page tours the features, so you can copy what you need.

Text and lists

You can use bold, italic, inline code and links. Task lists and tables come from GitHub-flavoured Markdown.

  • Write the first draft
  • Add a cover image
  • Publish
FeatureWhere it lives
Postscontent/blog
Authorscontent/authors
Site settingslib/site.js

Callouts

Code blocks

Add a title, line numbers and highlighted lines right after the opening backticks.

greet.ts
export function greet(name: string) {
  const message = `Hello, ${name}!`;
  return message;
}

Diffs, highlights and focus

Mark lines with a comment: [!code ++], [!code --], [!code highlight] or [!code focus].

diff.ts
const total = items.length; 
const total = items.filter(Boolean).length; 
console.log(total); 

Terminal blocks

Shell languages get a terminal frame automatically.

Run it locally
npm install
npm run dev

Math

Inline math looks like E=mc2E = mc^2, and display math gets its own line:

emissions=activity×emission factor\text{emissions} = \text{activity} \times \text{emission factor}

Images

Put images in public/ and reference them with a normal Markdown image. Give a post a cover image with the image field in its frontmatter.

Written by