Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for prism-react-renderer v2.0.2 #8940

Closed
1 of 2 tasks
laviniat1996 opened this issue Apr 27, 2023 · 1 comment · Fixed by #9316
Closed
1 of 2 tasks

Support for prism-react-renderer v2.0.2 #8940

laviniat1996 opened this issue Apr 27, 2023 · 1 comment · Fixed by #9316
Labels
proposal This issue is a proposal, usually non-trivial change

Comments

@laviniat1996
Copy link

Have you read the Contributing Guidelines on issues?

Motivation

A new version for prism-react-renderer is available, after of long pause. Maybe it would be helpful for Docusaurus to support this new version.

Self-service

  • I'd be willing to do some initial work on this proposal myself.
@laviniat1996 laviniat1996 added proposal This issue is a proposal, usually non-trivial change status: needs triage This issue has not been triaged by maintainers labels Apr 27, 2023
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Apr 27, 2023
@josephpage
Copy link

In fact, if you are using a Docusaurus configuration that is only little changed from the default, you can upgrade prism-react-renderer to v2 in your package.json even if Docusaurus continues to use v1 internally. To do this, you just need to change this lines in your docusaurus.config.js file:

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

by the following:

const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;

(remembering to adjust the themes names to match your wishes)

HyunmoAhn added a commit to HyunmoAhn/hyunmoahn.github.io that referenced this issue Aug 12, 2023
edwardzjl added a commit to edwardzjl/edwardzjl.github.io that referenced this issue Oct 17, 2023
edwardzjl added a commit to edwardzjl/edwardzjl.github.io that referenced this issue Oct 17, 2023
tuliren added a commit to stoat-dev/stoat-action that referenced this issue May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue is a proposal, usually non-trivial change
Projects
None yet
3 participants