how to specify styles in markdown metadata #1752
-
hi, Now daisyui has a bunch of themes - https://daisyui.com/docs/default-themes/ Is there a way to add a front-matter section, pick up the styles from there and apply them, etc ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
MDX includes exports. You could add the theme as an exported constant export const theme = 'halloween'
# rest of document
goes here You could also use a frontmatter if you prefer https://v2.mdxjs.com/guides/frontmatter/ In both cases, the layout component wrapping MDX would apply the theme. |
Beta Was this translation helpful? Give feedback.
MDX includes exports.
You could add the theme as an exported constant
You could also use a frontmatter if you prefer https://v2.mdxjs.com/guides/frontmatter/
In both cases, the layout component wrapping MDX would apply the theme.