Closed flossypurse closed 3 years ago
According to the docusaurus doc,
By default, Docusaurus comes with this subset of commonly used languages.
Which doesn't include Java, PHP, or Ruby. You have to manually include them in the config.
I have encountered the same thing, and I wonder why they didn't choose these languages to support out-of-the-box...
Ah, yes just figuring this out. The thing is - those languages used to be included by default. I was confused because we upgraded our site, and discovered that some of the languages stopped working...
Appreciate it @Josh-Cena Thank you!
š Bug Report
Out-of-the-box syntax highlighting is broken for at least Java, PHP, & Ruby.
There may be others...
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Yes.
To Reproduce
If possible, use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.
Sandbox didn't work. Received a
docusaurus not found
error when I tried to save changes, even after logging in.(Write your steps here:)
npx @docusaurus/init@latest init my-website classic
Java:
PHP:
Ruby:
Expected behavior
Code examples specified with a code type should have code specific syntax highlighting for popular languages like PHP, Ruby, and Java.
Actual Behavior
There is NO syntax highlighting for some langauges. It works for some like Go and Javascript. But not all. See screen shots:
Source:
Built site:
Your Environment
Public source code: This is from a fresh install of YOUR source code. But we use it in our docs site here: https://github.com/temporalio/documentation
Public site url: I won't upgrade my public site until this is fixed. But here ya go: https://docs.temporal.io/
Docusaurus version used: In depth testing was done using: @docusaurus/core v2.0.0-alpha.72 @docusaurus/preset-classic v2.0.0-alpha.72
But some testing revealed issues starting with 2.0.0-alpha.68 I am using 2.0.0-alpha.66 which works find
Reproducible Demo
If possible, use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.
That did not work for me - Just do a fresh install and see for yourself - takes 1 min.