diff --git a/examples/with-tailwindcss/astro.config.mjs b/examples/with-tailwindcss/astro.config.mjs index 4ad396807..393df1a4d 100644 --- a/examples/with-tailwindcss/astro.config.mjs +++ b/examples/with-tailwindcss/astro.config.mjs @@ -1,7 +1,8 @@ import { defineConfig } from 'astro/config'; +import mdx from '@astrojs/mdx'; import tailwind from '@astrojs/tailwind'; // https://astro.build/config export default defineConfig({ - integrations: [tailwind()], + integrations: [mdx(), tailwind()], }); diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 26095362e..4902b4195 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,6 +11,7 @@ "astro": "astro" }, "dependencies": { + "@astrojs/mdx": "^0.11.4", "@astrojs/tailwind": "^2.1.0", "@types/canvas-confetti": "^1.4.3", "astro": "^1.5.0", diff --git a/examples/with-tailwindcss/src/pages/markdown-page.md b/examples/with-tailwindcss/src/pages/markdown-page.md deleted file mode 100644 index 4f4859452..000000000 --- a/examples/with-tailwindcss/src/pages/markdown-page.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: 'Markdown + Tailwind' -layout: ../layouts/main.astro -setup: | - import Button from '../components/Button.astro'; ---- - -
- - Go home... -
diff --git a/examples/with-tailwindcss/src/pages/markdown-page.mdx b/examples/with-tailwindcss/src/pages/markdown-page.mdx new file mode 100644 index 000000000..8b024ec9c --- /dev/null +++ b/examples/with-tailwindcss/src/pages/markdown-page.mdx @@ -0,0 +1,13 @@ +--- +title: 'Markdown + Tailwind' +layout: ../layouts/main.astro +--- + +import Button from '../components/Button.astro'; + +
+ + + Go home... + +
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af98ae259..cca1d9229 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -326,6 +326,7 @@ importers: examples/with-tailwindcss: specifiers: + '@astrojs/mdx': ^0.11.4 '@astrojs/tailwind': ^2.1.0 '@types/canvas-confetti': ^1.4.3 astro: ^1.5.0 @@ -334,6 +335,7 @@ importers: postcss: ^8.4.14 tailwindcss: ^3.0.24 dependencies: + '@astrojs/mdx': link:../../packages/integrations/mdx '@astrojs/tailwind': link:../../packages/integrations/tailwind '@types/canvas-confetti': 1.4.3 astro: link:../../packages/astro