Replies: 3 comments 3 replies
-
Hey, did you find an answer to this? I'm guessing you’d need to use: <Code language="js">
const nameVar = {name}
</Code> but I'm not sure what |
Beta Was this translation helpful? Give feedback.
2 replies
-
I'm part way there. Nextra exports some components (as can be found in package.json/exports). import { Pre } from "nextra/components";
<Pre filename="bananas">
{expression}
</Pre> This will give you a block with Tailwind formatting, consistent with regular code blocks, but w/o syntax highlighting. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@robations I ended up using lowlight for syntax highlighting.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe this is a mdx/rehype question. MDX supports interpolating variables like so,
Is it possible to do the same inside code blocks?
Beta Was this translation helpful? Give feedback.
All reactions