Building a static blog with TinaCMS

1 min read

A demo of how MDX content and custom interactive components work together inside a visual editor.

On this page

Welcome

This post checks that MDX rendering and custom interactive components both work.

Callout component

Interactive components

The counter below is a purely client-side component that still works on a static site:

Clicks: 0

Tabs

interface Post { title: string; date: string; }

Images and video

The caption comes from the editor; the image lives in the media library.
YouTube and Bilibili are supported; paste an ID or a full URL.

Code blocks

ts
export default defineConfig({
  schema: {
    collections: [
      { name: 'post', path: 'content/posts', format: 'mdx', fields: [] },
    ],
  },
});

Tables and quotes

CapabilitySupported
Visual editing✅
MDX components✅
Static deployment✅
Content lives in the Git repository; saving in the editor creates a commit.

Math

Write inline LaTeX inside backticks: $e^{i\pi}+1=0$. You can also insert the Math component: a2+b2=c2a^2+b^2=c^2.

For a block formula, use a math code fence:

∫01x2 dx=13\int_{0}^{1} x^2\,dx = \frac{1}{3}

Braces, backslashes, and full-width punctuation inside math no longer break the MDX parser.

Back to all posts