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

[FR] Extend Docusaurus syntax highlighting to code samples #131

Closed
sserrata opened this issue Jun 13, 2022 · 0 comments
Closed

[FR] Extend Docusaurus syntax highlighting to code samples #131

sserrata opened this issue Jun 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sserrata
Copy link
Member

Is your feature request related to a problem?

Today, syntax highlighting for API code samples is distinct from the syntax highlighting applied by Docusaurus.

Describe the solution you'd like

Ideally, the syntax highlighting configured in docusaurus.config.js would automatically be applied to the code samples (and possibly the live request payload/param editor).

Describe alternatives you've considered

Attempting to use CSS variables to match the style, which doesn't always work well.

Additional context

One possible solution might be to adapt the Curl theme component to use the built-in Docusaurus CodeBlock component. I am not sure how we'd match styles with Monaco/VSCode editor, but it's possible we could pass the Docusaurus styles with prism-react-renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant