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

switch code highlighter to rehype-pretty-code #10172

merged 2 commits into from
Jan 30, 2024

Conversation

dan-mba
Copy link
Member

@dan-mba dan-mba commented Jan 23, 2024

Changes proposed

Switch code highlighter from remark-prism to rehype-pretty-code

Reasons:

  • remark-prism has not been updated in several years
  • rehype-pretty-code is recommended in the Nextjs documentation
  • allows for inline code language selection

Documentation of new highlighter.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Jan 23, 2024
@github-actions github-actions bot added the 📖 docs Documentation pages label Jan 23, 2024
Copy link
Member

@eddiejaoude eddiejaoude left a comment

Choose a reason for hiding this comment

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

looks great 👍

@dan-mba dan-mba marked this pull request as ready for review January 23, 2024 18:12
@dan-mba dan-mba requested a review from SaraJaoude as a code owner January 23, 2024 18:12
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.

Copy link
Member

@eddiejaoude eddiejaoude left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@eddiejaoude eddiejaoude merged commit b396607 into main Jan 30, 2024
13 checks passed
@eddiejaoude eddiejaoude deleted the mdx-code branch January 30, 2024 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file 📖 docs Documentation pages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants