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.
npm install
npm run dev
- Write MDX in the
contentdirectory. - Put components in the
componentsdirectory. - Use components in MDX (without imports).
Statically generated pages from MDX files that are not tied to the filesystem path
[slug].jsgenerates static paths usinggetStaticPathsfrom all.mdxfiles located in the specified directory (content/by default).- The
getStaticPropsNextJS 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.
- Support filesystem-based routing as an option
- Add some batteries-included examples
- Write a tutorial