ZOYKUHot Board

ryanwarner/next-mdx-digital-garden-starter기술 문서

An opinionated starting point for Digital Garden content authoring.

목차 (TOC) (5개 섹션)▾
언어 대체 안내:해당 저장소의 한국어 문서가 제공되지 않아 공식 영문 원본(English)으로 표시됩니다.
npm i next-mdx-digital-garden-starter

🌱 Next + MDX Digital Garden Starter

An opinionated starting point for Digital Garden content authoring.

Note: This setup does not handle code-splitting. I tried switching to mdx-bundler but could not get it to work.

Deploy with Vercel

Getting started

npm install
npm run dev

Use

  • Write MDX in the content directory.
  • Put components in the components directory.
  • Use components in MDX (without imports).

Goals

Statically generated pages from MDX files that are not tied to the filesystem path

How it works

  • [slug].js generates static paths using getStaticPaths from all .mdx files located in the specified directory (content/ by default).
  • The getStaticProps NextJS method passes the MDX content including front-matter (parsed with gray-matter) to the <PostPage /> component to be rendered.
  • The index or home page uses similar logic to generate a list of posts sorted by date.

TODO

  • Support filesystem-based routing as an option
  • Add some batteries-included examples
  • Write a tutorial
GitHub 공식 원본 저장소에서 아카이브된 문서 미러 · GitHub 저장소 방문
동기화 기준일: 2026-11-09