nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.11k stars 624 forks source link

Different code highlighter theme for inline and block code blocks #1995

Open imphil opened 1 year ago

imphil commented 1 year ago

Is your feature request related to a problem? Please describe

I'd like to use a different code highlighter theme for inline code (ProseCodeInline) and code blocks (ProseCode). Our site layout requires a dark background for code blocks (and hence a dark mode highlighter theme), and a the normal text and with it inline code has a white background (hence requiring a light highlighter theme).

Describe the solution you'd like

Give a way to specify the highlighter theme for ProseCodeInline and ProseCode separately, either in the config, or in the module itself (I'm already overriding these components, so adding a separate prop or something like that there is easy.)

Describe alternatives you've considered

As current workaround we deviate from the site layout requirements and use a white background for code blocks as well, but that's really a workaround only.

atinux commented 1 year ago

Do you mind sharing a screenshot or reproduction of what you you are trying to achieve?