Skip to content

Commit

Permalink
Merge pull request #122 from Kinfe123/route-and-mdx-fix
Browse files Browse the repository at this point in the history
Route and mdx fix
  • Loading branch information
sadmann7 authored Feb 19, 2024
2 parents e6982a7 + 176883c commit ecaaa8d
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 146 deletions.
5 changes: 2 additions & 3 deletions contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings"
import rehypeCodeTitles from "rehype-code-titles"
import rehypePrettyCode from "rehype-pretty-code"
import rehypeSlug from "rehype-slug"
import remarkGfm from "remark-gfm"

const computedFields: ComputedFields = {
slug: {
Expand Down Expand Up @@ -111,6 +112,7 @@ export default makeSource({
contentDirPath: "./src/content",
documentTypes: [Post, Author, Page],
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
[
// @ts-expect-error rehype-pretty-code has no types
Expand All @@ -120,9 +122,6 @@ export default makeSource({
dark: "one-dark-pro",
light: "github-light",
},
defaultLang: {
block: "typescript",
},
},
],
rehypeAutolinkHeadings,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"react-medium-image-zoom": "^5.1.10",
"react-syntax-highlighter": "^15.5.0",
"react-textarea-autosize": "^8.5.3",
"remark-gfm": "3.0.1",
"resend": "^3.0.0",
"server-only": "^0.0.1",
"sonner": "^1.3.1",
Expand Down Expand Up @@ -119,7 +120,6 @@
"rehype-code-titles": "^1.2.0",
"rehype-pretty-code": "^0.12.5",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"tailwindcss": "^3.4.1",
"tsx": "^4.7.0",
Expand Down
Loading

0 comments on commit ecaaa8d

Please sign in to comment.