fix(v2): render correct syntax theme for current website theme#2150
fix(v2): render correct syntax theme for current website theme#2150
Conversation
|
Deploy preview for docusaurus-2 ready! Built with commit 0fae54a |
Yes there's quite a bit of follow up work to do. Our highlighting colors now are just hardcoded without awareness of the current theme. |
endiliey
left a comment
There was a problem hiding this comment.
You can also use the react context (isClient) from Docusaurus context for the two pass rendering. It is built for the hydration purpose.
React toggle is consuming it
|
Oh cool. Should I use it? Was thinking of making the codeblocks more standalone 🤔 |
|
we can leave it as it is i guess. Not really sure on the perf benefit gain, probably only the fact that it does not rerender on every mount (?) cos context is on main bundle and we alrd consume context for themeconfig too. But its safe to leave it. If web performance is concerned, we are still lacking on making the first contentful paint & meaningful content paint faster (need smaller css for non render blocking evaluation 😉) |

Motivation
Fixes #2149
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs
#1984