Skip to content

An opinionated starting point for Digital Garden content authoring.

Notifications You must be signed in to change notification settings

ThaWolf/next-mdx-digital-garden-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 Next + MDX Digital Garden Starter

An opinionated starting point for Digital Garden content authoring.

Deploy with Vercel

Getting started

npm install
npm run dev

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

About

An opinionated starting point for Digital Garden content authoring.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%