Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

switch code highlighter to rehype-pretty-code #10172

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { withSentryConfig } from "@sentry/nextjs";
import remarkGfm from "remark-gfm";
import remarkPrism from "remark-prism";
import rehypePrettyCode from "rehype-pretty-code";
import createMDX from "@next/mdx";
import withPWA from "next-pwa";
import runtimeCaching from "next-pwa/cache.js";

const isProduction = process.env.NODE_ENV === "production";
//const isProduction = process.env.NODE_ENV === "production";
Copy link
Member

@eddiejaoude eddiejaoude Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer needed? Can it be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only referenced by a line in the pwaConfig section which is commented out.
I commented it out to get rid of the unused variable squiggly, but left it in case the config line gets uncommented.


/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down Expand Up @@ -47,8 +47,8 @@ const nextConfig = {
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm, [remarkPrism, { transformInlineCode: true }]],
rehypePlugins: [],
remarkPlugins: [remarkGfm],
rehypePlugins: [[rehypePrettyCode, {theme: "dracula", defaultLang: "plaintext"}]],
providerImportSource: "@mdx-js/react",
},
});
Expand Down
Loading