Skip to content

Commit

Permalink
Parse and inject frontmatter into the content automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Saunved committed Jun 13, 2024
1 parent ede7ed2 commit 72c824f
Show file tree
Hide file tree
Showing 3 changed files with 2,145 additions and 257 deletions.
6 changes: 4 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import nextMdx from "@next/mdx";
import { remarkCodeHike } from "@code-hike/mdx";
import theme from "shiki/themes/dracula-soft.json" assert {type: "json"};
import remarkFrontmatter from 'remark-frontmatter'
import { remarkMdxNext } from "remark-mdx-next";

const withMDX = nextMdx({
extension: /\.mdx?$/,
extension: /\.(md|mdx)$/,
options: {
remarkPlugins: [[remarkCodeHike, { theme, showCopyButton: true }]],
remarkPlugins: [remarkFrontmatter, remarkMdxNext, [remarkCodeHike, { theme, showCopyButton: true }]],
rehypePlugins: [],
},
});
Expand Down
Loading

0 comments on commit 72c824f

Please sign in to comment.