From 363376b9d5c0360589e98f347fb71b6e7ab34aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C3=ABl=20Guilloux?= Date: Tue, 12 Jul 2022 17:37:03 +0200 Subject: [PATCH 1/5] feat(tailwindcss): support tailwindcss classes in content (with hmr) --- src/module.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/module.ts b/src/module.ts index 23046747d..e1bb82031 100644 --- a/src/module.ts +++ b/src/module.ts @@ -545,6 +545,13 @@ export default defineNuxtModule({ ws.broadcast({ event, key }) }) }) + + // @nuxtjs/tailwindcss support + // @ts-ignore - Module might not exist + nuxt.hook('tailwindcss:config', (tailwindConfig) => { + tailwindConfig.content = tailwindConfig.content ?? [] + tailwindConfig.content.push(`${nuxt.options.buildDir}/cache/content/parsed/**/*.md`) + }) } }) From 955c7f1260ca0acc7e9d2b9b620150e917670253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C3=ABl=20Guilloux?= Date: Tue, 12 Jul 2022 17:39:37 +0200 Subject: [PATCH 2/5] docs(upgrade): upgrade docs to latest docus --- docs/README.md | 2 +- docs/content/4.api/3.configuration.md | 26 +- docs/layouts/blogpost.vue | 2 +- docs/nuxt.config.ts | 6 +- docs/package.json | 4 +- docs/theme.config.ts | 55 ++ docs/tokens.config.ts | 4 + docs/yarn.lock | 1209 ++++++++++++++----------- 8 files changed, 743 insertions(+), 565 deletions(-) create mode 100644 docs/theme.config.ts create mode 100644 docs/tokens.config.ts diff --git a/docs/README.md b/docs/README.md index ddef0e998..49d567d56 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ # Documentation -This documentation uses [Docus](https://github.com/nuxtlabs/docus). +This documentation uses [Docus](https://github.com/nuxt-themes/docus). ## 💻 Development diff --git a/docs/content/4.api/3.configuration.md b/docs/content/4.api/3.configuration.md index 6d80c4fe3..fad5204c5 100644 --- a/docs/content/4.api/3.configuration.md +++ b/docs/content/4.api/3.configuration.md @@ -304,11 +304,21 @@ Toggles the document-driven mode. ### `documentDriven` options -| Option | Type | Description | -| ----------------- | :--------: | :------------------------------------------------------------- | -| `page` | `Boolean` | Enables the page binding, making it globally accessible. | -| `navigation` | `Boolean` | Enables the navigation binding, making it globally accessible. | -| `surround` | `Boolean` | Enables the surround binding, making it globally accessible. | -| `globals` | `Object \| Boolean` | A list of globals to be made available globally. | -| `layoutFallbacks` | `string[]` | A list of `globals` key to use to find a layout fallback. | -| `injectPage` | `boolean` | Inject `[...slug].vue` pre-configured page | +| Option | Type | Description | +| ----------------- | :-----------------: | :------------------------------------------------------------- | +| `page` | `Boolean` | Enables the page binding, making it globally accessible. | +| `navigation` | `Boolean` | Enables the navigation binding, making it globally accessible. | +| `surround` | `Boolean` | Enables the surround binding, making it globally accessible. | +| `globals` | `Object \| Boolean` | A list of globals to be made available globally. | +| `layoutFallbacks` | `string[]` | A list of `globals` key to use to find a layout fallback. | +| `injectPage` | `boolean` | Inject `[...slug].vue` pre-configured page | + +## `integrations` + +@nuxt/content is built to be used with other [Nuxt modules](https://modules.nuxtjs.org/)! + +### `integrations` options + +| Option | Type | Description | +| ------------- | :-------: | :------------------------------------------------------------- | +| `tailwindcss` | `Boolean` | Enables the usage of Tailwind classes inside any content file. | diff --git a/docs/layouts/blogpost.vue b/docs/layouts/blogpost.vue index afe78e327..037be9809 100644 --- a/docs/layouts/blogpost.vue +++ b/docs/layouts/blogpost.vue @@ -12,7 +12,7 @@ const { page } = useDocus()
- +