Status
Follow-up from #2780 and @ElliotFriend’s review: CODE_LANGS in config/constants.ts is the subset of languages used as CodeExample tab labels, not every language Prism can highlight.
Done in #2780 (README + config/constants.ts stay in lockstep):
| Key |
Tab label |
Why |
css |
CSS |
Already fenced in docs/build/apps/example-application-tutorial/overview.mdx |
html |
HTML |
Already fenced across the example-application tutorial and guestbook frontend |
jsx |
JSX |
Already fenced in docs/build/guides/dapps/react.mdx and docs/tools/openzeppelin-relayer.mdx |
Not added (no fences in the docs today): react, html5, css3.
Future: when react (or html5/css3) should land
Add a CODE_LANGS key only when a CodeExample fence actually uses that language id, so the tab does not fall back to “Example”. Until then, React content in the docs should keep using jsx / tsx (what the files already use).
See the comment below for where React already lives in the ecosystem and where a react language id could show up later.
Status
Follow-up from #2780 and @ElliotFriend’s review:
CODE_LANGSinconfig/constants.tsis the subset of languages used asCodeExampletab labels, not every language Prism can highlight.Done in #2780 (README +
config/constants.tsstay in lockstep):cssdocs/build/apps/example-application-tutorial/overview.mdxhtmljsxdocs/build/guides/dapps/react.mdxanddocs/tools/openzeppelin-relayer.mdxNot added (no fences in the docs today):
react,html5,css3.Future: when
react(or html5/css3) should landAdd a
CODE_LANGSkey only when aCodeExamplefence actually uses that language id, so the tab does not fall back to “Example”. Until then, React content in the docs should keep usingjsx/tsx(what the files already use).See the comment below for where React already lives in the ecosystem and where a
reactlanguage id could show up later.