From 3b9d6a3cb2c1de26e49a334d7e5cbcbd55d2fab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C3=ABl=20Guilloux?= Date: Wed, 22 Jun 2022 16:58:22 +0200 Subject: [PATCH 01/12] feat(document-driven): add document-driven as a @nuxt/content feature --- .github/workflows/ci.yml | 2 +- .../3.guide/1.writing/7.document-driven.md | 139 +++++++ .../2.composables/4.use-document-driven.md | 84 ++++ .../2.composables/5.use-content-helpers.md | 80 ++++ docs/content/4.api/3.configuration.md | 66 ++- .../6.document-driven/1.hello-world.md | 9 + .../5.examples/6.document-driven/_dir.yml | 2 + docs/yarn.lock | 388 +++++++++--------- examples/document-driven/app.vue | 5 + examples/document-driven/content/about.md | 3 + examples/document-driven/content/index.md | 6 + examples/document-driven/nuxt.config.ts | 11 + examples/document-driven/package.json | 15 + package.json | 15 +- playground/{ => basic}/content-fa/_dir.yml | 0 playground/{ => basic}/content-fa/hello.md | 0 playground/basic/content/0.index.md | 9 + .../content/1.real-content}/content.md | 0 .../content/1.real-content}/query.md | 0 .../content/2.features}/1.unwrap.md | 0 .../content/2.features}/2.excerpt.md | 0 .../content/2.features}/3.mdc-highlighter.md | 0 .../content/2.features/4.path-overwrite.md | 6 + .../content/2.features/5.empty-document.md} | 0 .../content/3.file-formats}/csv.csv | 0 .../content/3.file-formats}/json.json | 0 .../content/3.file-formats}/json5.json5 | 0 .../content/3.file-formats}/yaml.yml | 0 playground/basic/content/98.playground.md | 6 + .../basic/content/99.query-playground.md | 6 + .../{ => basic}/content/_partials/cards.yml | 0 .../content/_partials/hello-world.md | 0 playground/basic/nuxt.config.ts | 16 + playground/basic/pages/[...slug].vue | 21 + playground/basic/pages/playground.vue | 21 + playground/basic/pages/query-playground.vue | 21 + playground/{ => basic}/public/favicon.ico | Bin playground/content/1.index.md | 9 - playground/content/_test.md | 7 - playground/content/features/4.navigation.md | 1 - playground/content/toto.md | 5 - .../components/content/Debug.vue | 36 ++ .../document-driven/composables/useTheme.ts | 9 + playground/document-driven/content/0.index.md | 3 + playground/document-driven/content/1.debug.md | 6 + .../document-driven/content/2.layout.md | 9 + .../document-driven/content/4.redirect.md | 5 + .../content/5.redirect-target.md | 13 + .../document-driven/content/6.empty-file.md | 0 playground/document-driven/content/_theme.yml | 1 + .../layouts/reversed.vue} | 6 +- playground/document-driven/nuxt.config.ts | 17 + playground/pages/[...slug].vue | 5 - playground/pages/sandbox.vue | 26 -- .../{ => shared}/components/NavItem.vue | 0 .../components/NuxtLoadingBar.vue | 0 .../{ => shared}/components/PageNav.vue | 16 +- .../{ => shared}/components/PagePrevNext.vue | 0 .../components/Playground.vue} | 14 +- .../components/QueryPlayground.vue} | 42 +- .../{ => shared}/components/content/Alert.vue | 0 .../components/content/MarkdownBetween.vue | 0 .../components/content/PageList.vue | 0 .../components/content/YamlList.vue | 0 playground/shared/layouts/default.vue | 18 + playground/{ => shared}/nuxt.config.ts | 21 +- playground/shared/pages/404/index.vue | 6 + playground/{ => shared}/server/api/parse.ts | 0 scripts/fixture.sh | 7 + scripts/playground.sh | 7 + scripts/test.sh | 9 + src/module.ts | 98 ++++- src/runtime/components/DocumentDrivenEmpty.ts | 20 + .../components/DocumentDrivenNotFound.ts | 10 + src/runtime/composables/documentDriven.ts | 83 ++++ src/runtime/composables/helpers.ts | 71 ++++ src/runtime/composables/navigation.ts | 2 + src/runtime/pages/document-driven.vue | 76 ++++ src/runtime/plugins/documentDriven.ts | 224 ++++++++++ src/runtime/{plugin.ts => plugins/ws.ts} | 2 +- test/basic.test.ts | 16 +- test/document-driven.test.ts | 16 + test/features/content-query.ts | 2 +- test/features/highlighter.ts | 2 +- test/features/mdc-component.ts | 6 +- test/features/module-options.ts | 12 +- test/features/navigation.ts | 2 +- test/features/parser-csv.ts | 4 +- test/features/parser-hooks.ts | 2 +- test/features/parser-json.ts | 3 +- test/features/parser-markdown-excerpt.ts | 2 +- test/features/parser-markdown.ts | 2 +- test/features/parser-yaml.ts | 2 +- test/features/query/match.test.ts | 2 +- test/features/query/utils.test.ts | 2 +- test/features/regex.ts | 2 +- test/features/transformer-path-meta.ts | 2 +- test/fixtures/basic/nuxt.config.ts | 2 +- .../components/content/Debug.vue | 36 ++ .../document-driven/composables/useTheme.ts | 9 + .../document-driven/content/0.index.md | 3 + .../document-driven/content/1.debug.md | 6 + .../document-driven/content/2.layout.md | 9 + .../document-driven/content/_theme.yml | 1 + .../document-driven/layouts/reversed.vue | 18 + test/fixtures/document-driven/nuxt.config.ts | 19 + .../document-driven/pages/[...slug].vue | 82 ++++ tsconfig.json | 2 +- yarn.lock | 364 ++++++++-------- 109 files changed, 1922 insertions(+), 523 deletions(-) create mode 100644 docs/content/3.guide/1.writing/7.document-driven.md create mode 100644 docs/content/4.api/2.composables/4.use-document-driven.md create mode 100644 docs/content/4.api/2.composables/5.use-content-helpers.md create mode 100644 docs/content/5.examples/6.document-driven/1.hello-world.md create mode 100644 docs/content/5.examples/6.document-driven/_dir.yml create mode 100644 examples/document-driven/app.vue create mode 100644 examples/document-driven/content/about.md create mode 100644 examples/document-driven/content/index.md create mode 100644 examples/document-driven/nuxt.config.ts create mode 100644 examples/document-driven/package.json rename playground/{ => basic}/content-fa/_dir.yml (100%) rename playground/{ => basic}/content-fa/hello.md (100%) create mode 100644 playground/basic/content/0.index.md rename playground/{content/real-content => basic/content/1.real-content}/content.md (100%) rename playground/{content/real-content => basic/content/1.real-content}/query.md (100%) rename playground/{content/features => basic/content/2.features}/1.unwrap.md (100%) rename playground/{content/features => basic/content/2.features}/2.excerpt.md (100%) rename playground/{content/features => basic/content/2.features}/3.mdc-highlighter.md (100%) create mode 100644 playground/basic/content/2.features/4.path-overwrite.md rename playground/{content/empty.md => basic/content/2.features/5.empty-document.md} (100%) rename playground/{content/file-formats => basic/content/3.file-formats}/csv.csv (100%) rename playground/{content/file-formats => basic/content/3.file-formats}/json.json (100%) rename playground/{content/file-formats => basic/content/3.file-formats}/json5.json5 (100%) rename playground/{content/file-formats => basic/content/3.file-formats}/yaml.yml (100%) create mode 100644 playground/basic/content/98.playground.md create mode 100644 playground/basic/content/99.query-playground.md rename playground/{ => basic}/content/_partials/cards.yml (100%) rename playground/{ => basic}/content/_partials/hello-world.md (100%) create mode 100644 playground/basic/nuxt.config.ts create mode 100644 playground/basic/pages/[...slug].vue create mode 100644 playground/basic/pages/playground.vue create mode 100644 playground/basic/pages/query-playground.vue rename playground/{ => basic}/public/favicon.ico (100%) delete mode 100644 playground/content/1.index.md delete mode 100644 playground/content/_test.md delete mode 100644 playground/content/features/4.navigation.md delete mode 100644 playground/content/toto.md create mode 100644 playground/document-driven/components/content/Debug.vue create mode 100644 playground/document-driven/composables/useTheme.ts create mode 100644 playground/document-driven/content/0.index.md create mode 100644 playground/document-driven/content/1.debug.md create mode 100644 playground/document-driven/content/2.layout.md create mode 100644 playground/document-driven/content/4.redirect.md create mode 100644 playground/document-driven/content/5.redirect-target.md create mode 100644 playground/document-driven/content/6.empty-file.md create mode 100644 playground/document-driven/content/_theme.yml rename playground/{app.vue => document-driven/layouts/reversed.vue} (78%) create mode 100644 playground/document-driven/nuxt.config.ts delete mode 100644 playground/pages/[...slug].vue delete mode 100644 playground/pages/sandbox.vue rename playground/{ => shared}/components/NavItem.vue (100%) rename playground/{ => shared}/components/NuxtLoadingBar.vue (100%) rename playground/{ => shared}/components/PageNav.vue (52%) rename playground/{ => shared}/components/PagePrevNext.vue (100%) rename playground/{pages/playground.vue => shared/components/Playground.vue} (90%) rename playground/{pages/query.vue => shared/components/QueryPlayground.vue} (73%) rename playground/{ => shared}/components/content/Alert.vue (100%) rename playground/{ => shared}/components/content/MarkdownBetween.vue (100%) rename playground/{ => shared}/components/content/PageList.vue (100%) rename playground/{ => shared}/components/content/YamlList.vue (100%) create mode 100644 playground/shared/layouts/default.vue rename playground/{ => shared}/nuxt.config.ts (60%) create mode 100644 playground/shared/pages/404/index.vue rename playground/{ => shared}/server/api/parse.ts (100%) create mode 100755 scripts/fixture.sh create mode 100755 scripts/playground.sh create mode 100755 scripts/test.sh create mode 100644 src/runtime/components/DocumentDrivenEmpty.ts create mode 100644 src/runtime/components/DocumentDrivenNotFound.ts create mode 100644 src/runtime/composables/documentDriven.ts create mode 100644 src/runtime/composables/helpers.ts create mode 100644 src/runtime/pages/document-driven.vue create mode 100644 src/runtime/plugins/documentDriven.ts rename src/runtime/{plugin.ts => plugins/ws.ts} (71%) create mode 100644 test/document-driven.test.ts create mode 100644 test/fixtures/document-driven/components/content/Debug.vue create mode 100644 test/fixtures/document-driven/composables/useTheme.ts create mode 100644 test/fixtures/document-driven/content/0.index.md create mode 100644 test/fixtures/document-driven/content/1.debug.md create mode 100644 test/fixtures/document-driven/content/2.layout.md create mode 100644 test/fixtures/document-driven/content/_theme.yml create mode 100644 test/fixtures/document-driven/layouts/reversed.vue create mode 100644 test/fixtures/document-driven/nuxt.config.ts create mode 100644 test/fixtures/document-driven/pages/[...slug].vue diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e7401787..0063c5863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - run: yarn dev:prepare - run: yarn lint - run: yarn build - - run: yarn test:unit + - run: yarn test - name: Release Edge if: | github.event_name == 'push' && diff --git a/docs/content/3.guide/1.writing/7.document-driven.md b/docs/content/3.guide/1.writing/7.document-driven.md new file mode 100644 index 000000000..d0069e3f7 --- /dev/null +++ b/docs/content/3.guide/1.writing/7.document-driven.md @@ -0,0 +1,139 @@ +--- +title: Document-driven +description: '@nuxt/content allows a new way of writing your website pages called Document-driven.' +--- + +Document-driven development gives a lot more power to Markdown-based pages. + +This mode creates a direct binding between your `content/` directory and your pages. + +It also offers `page`, `navigation`, `surround` and `globals` global variables. + +Let's dive into what this new @nuxt/content feature has to offer. + +## Global `page`, `surround` and `navigation` + +With this mode enabled, queries will be made from [route middlewares](https://v3.nuxtjs.org/guide/directory-structure/middleware#middleware-directory) and will be resolve before your page renders. + +That gives access to the [`useDocumentDriven()`](/api/composables/use-document-driven) composable anywhere in your app. + +```ts + +``` + +--- + +## Layout binding + +Most of the content context of your project becomes globally available with Document-driven mode. + +This unlocks the capability of configuring your page layout from the front-matter. + +To do so, you only have to specify an available layout from your page front-matter: + +```md [my-page.md] +--- +layout: reversed +--- + +This page will use the reversed layout! +``` + +By default, the app will search for `default` layout if none is specified. + +If you want to use another layout, you might want to use `layoutFallbacks` key from the configuration: + +```ts [nuxt.config.ts] +export default defineNuxtConfig({ + content: { + documentDriven: { + layoutFallbacks: ['theme'], + } + } +}) +``` + +This configuration will search for a `theme` key in `globals`, then search for a `layout` key inside that global object. + +If it is found, that layout key will be used as a fallback. + +--- + +## Globally available queries + +This mode gives you a convenient way to access some files data globally in your app. + +To do so, you have to specify a query in your `documentDriven.globals` key of your module configuration: + +```ts [nuxt.config.ts] +export default defineNuxtConfig({ + content: { + documentDriven: { + globals: { + theme: { + where: [ + { + _id: 'content:_theme.yml' + } + ], + without: ['_'] + } + } + } + } +}) +``` + +This configuration will search for a `_theme.yml` file in the `content/` directory. + +If it is found, it'll add it as `globals.theme` key, accessible via `useDocumentDriven().globals`. + +Any change to these files will be automatically reflected in the app, as any other file from @nuxt/content. + +--- + +## Catch-all page injection + +The Document-driven mode also ships with a pre-configured catch-all page. + +That bundled page is useful to keep your project structure ultra minimal when using Document-driven mode. + +Here is what your project can look like with this enabled: + +``` +my-project/ + content/ + nuxt.config.ts + package.json + tsconfig.json +``` + +It comes with a direct binding between your pages `title` and `description` to your OpenGraph tags. + +Also, it allows you to use `cover` key from front-matter to set the OpenGraph `og:image` and `twitter:image` tags. + +```md [my-page.md] +--- +cover: + src: /path/to/image.jpg + alt: "My Cover Image" +--- +``` + +### Page slots + +That page comes with 2 slot components, that you can replace at your project level. + +To do so, you only have to create a component with the same name in your project `components/` directory. + +#### `` + +This component will be shown when there is no content for the current page, but the page exists. + +#### `` + +This component will be shown when no page has been found for the current URL. diff --git a/docs/content/4.api/2.composables/4.use-document-driven.md b/docs/content/4.api/2.composables/4.use-document-driven.md new file mode 100644 index 000000000..b4be6759d --- /dev/null +++ b/docs/content/4.api/2.composables/4.use-document-driven.md @@ -0,0 +1,84 @@ +--- +title: useDocumentDriven() +--- + +::alert{type="warning"} +This composable will only be enabled if you toggle the [Document-driven](/guide/writing/document-driven) feature! +:: + +## Usage + +`useDocumentDriven()`{lang="ts"} is available everywhere in your app and gives access to a list of refs based on your content. + +```ts + +``` + +## Examples + +### Rendering the page + +Rendering the current page becomes a bliss with this composable: + +```vue [pages/[...slug].vue] + + + +``` + +### Creating a previous/next page component + +```vue [PagePrevNext.vue] + + + +``` + +### Creating a Table of Contents component + +```vue [PageToc.vue] + + + +``` diff --git a/docs/content/4.api/2.composables/5.use-content-helpers.md b/docs/content/4.api/2.composables/5.use-content-helpers.md new file mode 100644 index 000000000..353664926 --- /dev/null +++ b/docs/content/4.api/2.composables/5.use-content-helpers.md @@ -0,0 +1,80 @@ +--- +title: useContentHelpers() +--- + +## Usage + +`useContentHelpers()`{lang="ts"} is available everywhere in your app and gives access to helpers to interact with the navigation object. + +```ts + +``` + +### `navBottomLink()` + +This function will take a navigation node and will resolve the first available path from that node. + +It can be useful to build nested navigations systems. + +**Example:** + +```ts +const { navigation } = useDocumentDriven() + +const path = navBottomLink(navigation.value) +``` + +### `navDirFromPath()` + +This function will take a path and will resolve the first available navigation node from that path. + +It can be useful to find the current directory of a navigation node. + +**Example:** + +```ts +const route = useRoute() + +const { navigation } = useDocumentDriven() + +const dir = navDirFromPath(route.path, navigation.value) +``` + +### `navPageFromPath()` + +This function will take a path and will resolve the first available navigation page from that path. + +It can be useful to find the current navigation node the page you're browsing. + +**Example:** + +```ts +const route = useRoute() + +const { navigation } = useDocumentDriven() + +const page = navPageFromPath(route.path, navigation.value) +``` + +### `navKeyFromPath()` + +This function will take a path and will resolve a specific key from that path. + +It can be useful when you want to add a fallback on the `_dir.yml` value of a key in a page. + +**Example:** + +```ts +const route = useRoute() + +const { navigation } = useDocumentDriven() + +const layout = navKeyFromPath(route.path, 'layout', navigation.value) +``` diff --git a/docs/content/4.api/3.configuration.md b/docs/content/4.api/3.configuration.md index 6eac43711..37c7a274c 100644 --- a/docs/content/4.api/3.configuration.md +++ b/docs/content/4.api/3.configuration.md @@ -63,10 +63,10 @@ The watcher is a development feature and will not be included in production. ### `ws` options -| Option | Default | Description | -| ----------------- | :--------: | :-------- | -| `port` | `4000` | Select the port used for the WebSocket server. | -| `showUrl` | `false` | Toggle URL display in dev server boot message. | +| Option | Default | Description | +| --------- | :-----: | :--------------------------------------------- | +| `port` | `4000` | Select the port used for the WebSocket server. | +| `showUrl` | `false` | Toggle URL display in dev server boot message. | ## `sources` @@ -200,10 +200,10 @@ Nuxt Content uses [Shiki](https://github.com/shikijs/shiki) to provide syntax hi ### `highlight` options -| Option | Type | Description | -| ----------------- | :--------: | :-------- | -| `theme` | `ShikiTheme` or `Record` | The [color theme](https://github.com/shikijs/shiki/blob/main/docs/themes.md) to use. | -| `preload` | `ShikiLang[]` | The [preloaded languages](https://github.com/shikijs/shiki/blob/main/docs/languages.md) available for highlighting. | +| Option | Type | Description | +| --------- | :------------------------------------------: | :------------------------------------------------------------------------------------------------------------------ | +| `theme` | `ShikiTheme` or `Record` | The [color theme](https://github.com/shikijs/shiki/blob/main/docs/themes.md) to use. | +| `preload` | `ShikiLang[]` | The [preloaded languages](https://github.com/shikijs/shiki/blob/main/docs/languages.md) available for highlighting. | #### `highlight.theme` @@ -251,9 +251,9 @@ Can be set to `false` to disable the feature completely. ### `navigation` options -| Option | Type | Description | -| ----------------- | :--------: | :-------- | -| `fields` | `string[]` | A list of fields to inherit from front-matter to navigation nodes. | +| Option | Type | Description | +| -------- | :--------: | :----------------------------------------------------------------- | +| `fields` | `string[]` | A list of fields to inherit from front-matter to navigation nodes. | ## `locales` @@ -268,3 +268,47 @@ List of locale codes. This codes will be used to detect contents locale. - Default: `undefined`{lang=ts} Default locale for top level contents. Module will use first locale code from `locales` array if this option is not defined. + +## `documentDriven` + +- Type: `Boolean | Object`{lang=ts} +- Default: `false`{lang=ts} + +Toggles the document-driven mode. + +`false`{lang="ts"} will disable the feature completely. + +`true`{lang="ts"} will enable the feature with these defaults: + +```ts [Document-driven defaults] +{ + // Will fetch navigation, page and surround. + navigation: true, + page: true, + surround: true, + // Will fetch `content/_theme.yml` and put it in `globals.theme` if present. + globals: { + theme: { + where: { + _id: 'content:_theme.yml' + }, + without: ['_'] + } + }, + // Will use `theme` global to search for a fallback `layout` key. + layoutFallbacks: ['theme'], + // Will inject `[...slug].vue` as the root page. + injectPage: true +} +``` + +### `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 | diff --git a/docs/content/5.examples/6.document-driven/1.hello-world.md b/docs/content/5.examples/6.document-driven/1.hello-world.md new file mode 100644 index 000000000..877d2b82b --- /dev/null +++ b/docs/content/5.examples/6.document-driven/1.hello-world.md @@ -0,0 +1,9 @@ +--- +title: Hello world +--- + +::ReadMore{link="/guide/writing/document-driven"} +:: + +::sandbox{repo="nuxt/content" branch="main" dir="examples/document-driven" file="index.md"} +:: diff --git a/docs/content/5.examples/6.document-driven/_dir.yml b/docs/content/5.examples/6.document-driven/_dir.yml new file mode 100644 index 000000000..da5980ef1 --- /dev/null +++ b/docs/content/5.examples/6.document-driven/_dir.yml @@ -0,0 +1,2 @@ +title: Document-driven +icon: heroicons-outline:cube diff --git a/docs/yarn.lock b/docs/yarn.lock index f30b51332..2d432ab5e 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -280,10 +280,10 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.1.tgz#b6b8d81780b9a9f6459f4bfe9226ac6aefaefe87" integrity sha512-aG20vknL4/YjQF9BSV7ts4EWm/yrjagAN7OWBNmlbEOUiu0llj4OGrFoOKK3g2vey4/p2omKCoHrWtPxSwV3HA== -"@docus/base@npm:@docus/base-edge@3.0.0-4720f14": - version "3.0.0-4720f14" - resolved "https://registry.yarnpkg.com/@docus/base-edge/-/base-edge-3.0.0-4720f14.tgz#885672113edd1a1206cd6a596e269fbbff66db80" - integrity sha512-yhldmqQb8jdBMFhPDX9N4s5arkZu0G3wKY0/Q+II23iEAS1534wzHHNXiDyxfxwR2v1X5q/Jpg7JDSS7tX3d2g== +"@docus/base@npm:@docus/base-edge@3.0.0-cc82b14": + version "3.0.0-cc82b14" + resolved "https://registry.yarnpkg.com/@docus/base-edge/-/base-edge-3.0.0-cc82b14.tgz#8a570fd5eca8425375fa96c69e7d6fd2195fc3ab" + integrity sha512-b0xqyqYDwXrcGiqQI8rtwgiHSXmRvC16pWk/8KfS/5YDcmQRRskWb+1tlffnr8X+G8GLInRrq/mywNKrLnwcBA== dependencies: "@nuxt/content" "npm:@nuxt/content-edge@latest" "@nuxthq/admin" "npm:@nuxthq/admin-edge@latest" @@ -294,11 +294,11 @@ pkg-types "^0.3.2" "@docus/docs-theme@npm:@docus/docs-theme-edge@latest": - version "3.0.0-4720f14" - resolved "https://registry.yarnpkg.com/@docus/docs-theme-edge/-/docs-theme-edge-3.0.0-4720f14.tgz#eec0f92160f83dac954cdc30e069e64283174e84" - integrity sha512-vb5mxVDQoeYsX4u9NrCuwvrP3F0jeKH0AMa+IBKlN6wza2HyRtthNk+GDFCxcUDXOg4RZAXEa37mDctsN21aOA== + version "3.0.0-cc82b14" + resolved "https://registry.yarnpkg.com/@docus/docs-theme-edge/-/docs-theme-edge-3.0.0-cc82b14.tgz#a29d37848023117e5ee65e224ab7dc406f0b73cb" + integrity sha512-IkG5/a82p3oFMIAHC5qmNDtMO8MaRHsM2PR5X6G84Pou9K8RFURxQN4nvj3pUyKz1rbYSDdnAG9pYxZw1QAeyw== dependencies: - "@docus/base" "npm:@docus/base-edge@3.0.0-4720f14" + "@docus/base" "npm:@docus/base-edge@3.0.0-cc82b14" "@iconify/vue" "^3.2.1" "@nuxtjs/color-mode" "^3.1.4" "@nuxtjs/tailwindcss" "^5.1.2" @@ -311,9 +311,9 @@ vue-plausible "^1.3.1" "@docus/github@npm:@docus/github-edge@latest": - version "1.2.6-4720f14" - resolved "https://registry.yarnpkg.com/@docus/github-edge/-/github-edge-1.2.6-4720f14.tgz#a48e75147eecf90e259c7e0ac10c2f27a406cc67" - integrity sha512-wsjsxAeRGisDzy0Gghw3wkeRb2dGHB/wduainYbJOSKCsQw3rJX3U3CkTFUEVY7qysvgaN2htBqqfrlxhDsNKA== + version "1.2.6-cc82b14" + resolved "https://registry.yarnpkg.com/@docus/github-edge/-/github-edge-1.2.6-cc82b14.tgz#eb92deec34a882f73666096264b0ad06b552c525" + integrity sha512-uooYOtaxx+PJ+J4wWTW2fUaRaku30m+/UB1fwF5G1uhykKmql0X1x/C/ALjiM1bUr0SQnijLBvxRYo40gO4gLA== dependencies: "@nuxt/kit" "^3.0.0-rc.4" "@octokit/graphql" "^4.8.0" @@ -452,9 +452,9 @@ fastq "^1.6.0" "@nuxt/content@npm:@nuxt/content-edge@latest": - version "2.0.1-27594175.6a05508" - resolved "https://registry.yarnpkg.com/@nuxt/content-edge/-/content-edge-2.0.1-27594175.6a05508.tgz#a46bbb0d530fa3c9e72765c36a50962b2f0576ce" - integrity sha512-nmSoH0AHqIbRZKGLLMcuLB1r+/00v8jStYaByRSsCtQAbjOuUKshY1K4LPLRL46Jf+TvZ0Oa3Q9BjnEL3c24Pg== + version "2.0.1-27597026.cfbad47" + resolved "https://registry.yarnpkg.com/@nuxt/content-edge/-/content-edge-2.0.1-27597026.cfbad47.tgz#a522963d14270ce60d1486a7d5992e2bd65b088f" + integrity sha512-fKDFLKHnBhhqzmjCtT3xFfgIGeIsVrI6nCBNhQyMFsiAnD5YXelr/afiqPu5zKQdhCYqoNrWI+0wOGiCgqTwmQ== dependencies: "@nuxt/kit" "^3.0.0-rc.4" csvtojson "^2.0.10" @@ -465,7 +465,7 @@ html-tags "^3.2.0" js-yaml "^4.1.0" json5 "^2.2.1" - listhen "^0.2.12" + listhen "^0.2.13" mdast-util-from-markdown "^1.2.0" mdast-util-to-hast "^12.1.1" mdast-util-to-markdown "^1.3.0" @@ -728,17 +728,17 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^12.1.0": - version "12.1.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.1.0.tgz#a68b60e969f26dee0eb7d127c65a84967f2d3a6e" - integrity sha512-kQzJh3ZUv3lDpi6M+uekMRHULvf9DlWoI1XgKN6nPeGDzkSgtkhVq1MMz3bFKQ6H6GbdC3ZqG/a6VzKhIx0VeA== +"@octokit/openapi-types@^12.4.0": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.4.0.tgz#fd8bf5db72bd566c5ba2cb76754512a9ebe66e71" + integrity sha512-Npcb7Pv30b33U04jvcD7l75yLU0mxhuX2Xqrn51YyZ5WTkF04bpbxLaZ6GcaTqu03WZQHoO/Gbfp95NGRueDUA== "@octokit/plugin-paginate-rest@^2.16.8": - version "2.18.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.18.0.tgz#e412977782690a4134b0a4aa2f536cca7a2ca125" - integrity sha512-n5/AzIoy5Wzp85gqzSbR+dWQDHlyHZrGijnDfLh452547Ynu0hCvszH7EfRE0eqM5ZjfkplO0k+q+P8AAIIJEA== + version "2.19.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.19.0.tgz#b52eae6ecacfa1f5583dc2cc0985cfbed3ca78b0" + integrity sha512-hQ4Qysg2hNmEMuZeJkvyzM4eSZiTifOKqYAMsW8FnxFKowhuwWICSgBQ9Gn9GpUmgKB7qaf1hFvMjYaTAg5jQA== dependencies: - "@octokit/types" "^6.35.0" + "@octokit/types" "^6.36.0" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" @@ -746,11 +746,11 @@ integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== "@octokit/plugin-rest-endpoint-methods@^5.12.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.14.0.tgz#758e01ac40998e607feaea7f80220c69990814ae" - integrity sha512-MRnMs4Dcm1OSaz/g/RLr4YY9otgysS7vN5SUkHGd7t+R8323cHsHFoEWHYPSmgUC0BieHRhvnCRWb4i3Pl+Lgg== + version "5.15.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.15.0.tgz#6c8251b55c33315a6e53e5b55654f72023ed5049" + integrity sha512-Gsw9+Xm56jVhfbJoy4pt6eOOyf8/3K6CAnx1Sl7U2GhZWcg8MR6YgXWnpfdF69S2ViMXLA7nfvTDAsZpFlkLRw== dependencies: - "@octokit/types" "^6.35.0" + "@octokit/types" "^6.36.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -784,12 +784,12 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.12.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.35.0": - version "6.35.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.35.0.tgz#11cd9a679c32b4a6c36459ae2ec3ac4de0104f71" - integrity sha512-DhLfdUuv3H37u6jBDfkwamypx3HflHg29b26nbA6iVFYkAlZ5cMEtu/9pQoihGnQE5M7jJFnNo25Rr1UwQNF8Q== +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.36.0": + version "6.37.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.37.0.tgz#32eb78edb34cf5cea4ba5753ab8db75b776d617a" + integrity sha512-BXWQhFKRkjX4dVW5L2oYa0hzWOAqsEsujXsQLSdepPoDZfYdubrD1KDGpyNldGXtR8QM/WezDcxcIN1UKJMGPA== dependencies: - "@octokit/openapi-types" "^12.1.0" + "@octokit/openapi-types" "^12.4.0" "@rollup/plugin-alias@^3.1.9": version "3.1.9" @@ -1484,15 +1484,14 @@ braces@^3.0.2, braces@~3.0.2: fill-range "^7.0.1" browserslist@^4.0.0, browserslist@^4.16.6, browserslist@^4.20.2, browserslist@^4.20.3: - version "4.20.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.4.tgz#98096c9042af689ee1e0271333dbc564b8ce4477" - integrity sha512-ok1d+1WpnU24XYN7oC3QWgTyMhY/avPJ/r9T00xxvUOIparA/gc+UPUMaod3i+G6s+nI2nUb9xZ5k794uIwShw== + version "4.21.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.0.tgz#7ab19572361a140ecd1e023e2c1ed95edda0cefe" + integrity sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA== dependencies: - caniuse-lite "^1.0.30001349" - electron-to-chromium "^1.4.147" - escalade "^3.1.1" + caniuse-lite "^1.0.30001358" + electron-to-chromium "^1.4.164" node-releases "^2.0.5" - picocolors "^1.0.0" + update-browserslist-db "^1.0.0" buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: version "0.2.13" @@ -1578,10 +1577,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001349: - version "1.0.30001357" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001357.tgz#dec7fc4158ef6ad24690d0eec7b91f32b8cb1b5d" - integrity sha512-b+KbWHdHePp+ZpNj+RDHFChZmuN+J5EvuQUlee9jOQIUAdhv9uvAZeEtUeLAknXbkiu1uxjQ9NLp1ie894CuWg== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001358: + version "1.0.30001358" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz#473d35dabf5e448b463095cab7924e96ccfb8c00" + integrity sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw== ccount@^2.0.0: version "2.0.1" @@ -2240,10 +2239,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.147: - version "1.4.161" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.161.tgz#49cb5b35385bfee6cc439d0a04fbba7a7a7f08a1" - integrity sha512-sTjBRhqh6wFodzZtc5Iu8/R95OkwaPNn7tj/TaDU5nu/5EFiQDtADGAXdR4tJcTEHlYfJpHqigzJqHvPgehP8A== +electron-to-chromium@^1.4.164: + version "1.4.164" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.164.tgz#3d0f5c83557d8ec8a7faa531e498f198c3bd974a" + integrity sha512-K7iy5y6XyP9Pzh3uaDti0KC4JUNT6T1tLG5RTOmesqq2YgAJpYYYJ32m+anvZYjCV35llPTEh87kvEV/uSsiyQ== emmet-monaco-es@^5.1.0: version "5.1.0" @@ -2339,131 +2338,131 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -esbuild-android-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.46.tgz#98d019853ca7b526d0d645bb4618fda425b74d35" - integrity sha512-ZyJqwAcjNbZprs0ZAxnUAOhEhdE5kTKwz+CZuLmZYNLAPyRgBtaC8pT2PCuPifNvV8Cl3yLlrQPaOCjovoyb5g== - -esbuild-android-arm64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.46.tgz#19835d5265b57120c14fba56a19fc317ca4bbda0" - integrity sha512-BKcnUksvCijO9ONv6b4SikZE/OZftwJvX91XROODZGQmuwGVg97jmLDVu3lxuHdFlMNNzxh8taJ2mbCWZzH/Iw== - -esbuild-darwin-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.46.tgz#2819465ab92f6df407e6462d9e56f6563a043a44" - integrity sha512-/ss2kO92sUJ9/1nHnMb3+oab8w6dyqKrMtPMvSYJ9KZIYGAZxz/WYxfFprY7Xk+ZxWnnlASSyZlG+If1nVmFYg== - -esbuild-darwin-arm64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.46.tgz#2d523fa628930bba38a4f75cede75d6341bc3b5b" - integrity sha512-WX0JOaEFf6t+rIjXO6THsf/0fhQAt2Zb0/PSYlvXnuQQAmOmFAfPsuRNocp5ME0NGaUqZd4FxqqmLEVK3RzPAg== - -esbuild-freebsd-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.46.tgz#dbfbbb1cb943149aaa83b9e767ded6f14ad42ba5" - integrity sha512-o+ozPFuHRCAGCVWU2bLurOUgVkT0jcPEu082VBUY2Q/yLf+B+/3nXzh4Fjp5O21tOvJRTn7hUVydG9j5+vYE6A== - -esbuild-freebsd-arm64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.46.tgz#fb066d6e7de2bd96138dd1c2fba5e8ce5233ed5a" - integrity sha512-9zicZ0X43WDKz3sjNfcqYO38xbfJpSWYXB+FxvYYkmBwGA52K0SAu4oKuTTLi8od8X2IIo1x5C5TUNvKDSVJww== - -esbuild-linux-32@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.46.tgz#ea2464b10fe188ee7c9be81a2757e2d69ffdb8c1" - integrity sha512-ZnTpZMVb0VGvL99R5eh4OrJwbUyvpM6M88VAMuHP4LvFjuvZrhgefjKqEGuWZZW7JRnAjKqjXLjWdhdSjwMFnQ== - -esbuild-linux-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.46.tgz#f4f2d181af6ea78137311712fca423f8fa954314" - integrity sha512-ECCRRZtX6l4ubeVhHhiVoK/uYAkvzNqfmR4gP4N/9H9RPu+b8YCcN4bQGp7xCuYIV6Xd41WpOMyO+xpcQvjtQQ== - -esbuild-linux-arm64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.46.tgz#113d17c523dfe80c9d4981d05c58f5ada3470e30" - integrity sha512-HX0TXCHyI0NEWG4jg8LlW1PbZQbnz+PUH56yjx996cgM5pC90u32drKs/tyJiyyQmNk9OXOogjKw7LEdp/Qc1w== - -esbuild-linux-arm@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.46.tgz#1b6ba77b0301572b2fed35fe922b1613b10b5c7e" - integrity sha512-RvTJEi4vj13c5FP9YPp+8Y6x6HK1E7uSqfy3y9UoeaNAzNZWA7fN1U3hQjTL/dy5zTJH5KE64mrt5k5+he+CQA== - -esbuild-linux-mips64le@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.46.tgz#8775e12510eaf988a9bc5e6787cf0c87c3eb40d6" - integrity sha512-jnb2NDwGqJUVmxn1v0f7seNdDm0nRNWHP9Z3MrWAGnBCdnnDlsjqRFDnbKoaQvWONEa+rOOr/giK+VL0hgQExA== - -esbuild-linux-ppc64le@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.46.tgz#da003df59859b02e160827e26bc1e107bec23d07" - integrity sha512-uu3JTQUrwwauKY9z8yq5MnDyOlT3f2DNOzBcYz4dB78HqwEqilCsifoBGd0WcbED5n57dc59X+LZMTZ8Ose44w== - -esbuild-linux-riscv64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.46.tgz#b6c4faf9f8482e2a898ec2becac4a6789ae3ff22" - integrity sha512-OB29r1EG44ZY34JnXCRERxo7k4pRKoQdaoRg2HIeCavatsXZwW4LCakpLnMQ72vXT1HtpBUABEjHkKkn5JyrUg== - -esbuild-linux-s390x@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.46.tgz#d30d0f7ee8466c4ec99ac2c689b70514320406b2" - integrity sha512-XQ/U9TueMSGYyPTKyZsJVraiuvxhwCDIMn/QwFXCRCJ6H/Cy/Rq33u9qhpeSziinHKfzJROGx5A8mQY6aYamdQ== - -esbuild-netbsd-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.46.tgz#fcf2b739b63731b5b264dc584240c0b61dbbf035" - integrity sha512-i15BwqHaAIFp1vBJkitAbHtwXcLk9TdHs/Ia1xGIAutQYXSJNPLM3Z4B4hyfHNEFl2yBqBIYpglMohv2ClNdOQ== - -esbuild-openbsd-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.46.tgz#fc7880751b78b325216e66470b9a3df7b1c21cbf" - integrity sha512-XwOIFCE140Y/PvjrwjFfa/QLWBuvhR1mPCOa35mKx02jt++wPNgf0qhn6HfdVC3vQe7R46RwTp4q2cp99fepEg== - -esbuild-sunos-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.46.tgz#ab73b91e79ae53dddb035da9bb69ba7dd44d36ee" - integrity sha512-+kV3JnmfdxBVpHyFvuGXWtu6tXxXApOLPkSrVkMJf6+ns/3PLtPndpzwCzHjD+qYUEk8ln4MA+ufQ2qmjW5mZg== - -esbuild-windows-32@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.46.tgz#88ad388c896325d273e92dbf28f146d1d34d4351" - integrity sha512-gzGC1Q11B/Bo5A2EX4N22oigWmhL7Z0eDyc8kbSoJjqSrGQuRE7B0uMpluO+q0O/gZ1S3zdw+M4PCWlqOIeXLA== - -esbuild-windows-64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.46.tgz#bfb21b68d54d0db86190f8073cbf66a86bd0de14" - integrity sha512-Do2daaskfOjmCB7o3ygz6fD3K6SPjZLERiZLktzHz2oUCwsebKu/gmop0+j/XdrVIXC32wFzHzDS+9CTu9OShw== - -esbuild-windows-arm64@0.14.46: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.46.tgz#b8aa66a0c347342b9ae780b537d5574e9691c123" - integrity sha512-VEzMy6bM60/HT/URTDElyhfi2Pk0quCCrEhRlI4MRno/AIqYUGw0rZwkPl6PeoqVI6BgoBHGY576GWTiPmshCA== +esbuild-android-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.47.tgz#ef95b42c67bcf4268c869153fa3ad1466c4cea6b" + integrity sha512-R13Bd9+tqLVFndncMHssZrPWe6/0Kpv2/dt4aA69soX4PRxlzsVpCvoJeFE8sOEoeVEiBkI0myjlkDodXlHa0g== + +esbuild-android-arm64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.47.tgz#4ebd7ce9fb250b4695faa3ee46fd3b0754ecd9e6" + integrity sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ== + +esbuild-darwin-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.47.tgz#e0da6c244f497192f951807f003f6a423ed23188" + integrity sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA== + +esbuild-darwin-arm64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.47.tgz#cd40fd49a672fca581ed202834239dfe540a9028" + integrity sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw== + +esbuild-freebsd-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.47.tgz#8da6a14c095b29c01fc8087a16cb7906debc2d67" + integrity sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ== + +esbuild-freebsd-arm64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.47.tgz#ad31f9c92817ff8f33fd253af7ab5122dc1b83f6" + integrity sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ== + +esbuild-linux-32@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.47.tgz#de085e4db2e692ea30c71208ccc23fdcf5196c58" + integrity sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw== + +esbuild-linux-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.47.tgz#2a9321bbccb01f01b04cebfcfccbabeba3658ba1" + integrity sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw== + +esbuild-linux-arm64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.47.tgz#b9da7b6fc4b0ca7a13363a0c5b7bb927e4bc535a" + integrity sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw== + +esbuild-linux-arm@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.47.tgz#56fec2a09b9561c337059d4af53625142aded853" + integrity sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA== + +esbuild-linux-mips64le@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.47.tgz#9db21561f8f22ed79ef2aedb7bbef082b46cf823" + integrity sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg== + +esbuild-linux-ppc64le@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.47.tgz#dc3a3da321222b11e96e50efafec9d2de408198b" + integrity sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w== + +esbuild-linux-riscv64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.47.tgz#9bd6dcd3dca6c0357084ecd06e1d2d4bf105335f" + integrity sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g== + +esbuild-linux-s390x@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.47.tgz#a458af939b52f2cd32fc561410d441a51f69d41f" + integrity sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw== + +esbuild-netbsd-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.47.tgz#6388e785d7e7e4420cb01348d7483ab511b16aa8" + integrity sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ== + +esbuild-openbsd-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.47.tgz#309af806db561aa886c445344d1aacab850dbdc5" + integrity sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw== + +esbuild-sunos-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.47.tgz#3f19612dcdb89ba6c65283a7ff6e16f8afbf8aaa" + integrity sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ== + +esbuild-windows-32@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.47.tgz#a92d279c8458d5dc319abcfeb30aa49e8f2e6f7f" + integrity sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ== + +esbuild-windows-64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.47.tgz#2564c3fcf0c23d701edb71af8c52d3be4cec5f8a" + integrity sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ== + +esbuild-windows-arm64@0.14.47: + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.47.tgz#86d9db1a22d83360f726ac5fba41c2f625db6878" + integrity sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ== esbuild@^0.14.27, esbuild@^0.14.43: - version "0.14.46" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.46.tgz#d548cfc13fecfd4bc074ce38e0122d1dd9b067db" - integrity sha512-vdm5G1JdZBktva8dwQci/s44VbeBUg8g907xoZx77mqFZ4gU5GlMULNsdGeID+qXCXocsfYSGtE0LvqH3eiNQg== + version "0.14.47" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.47.tgz#0d6415f6bd8eb9e73a58f7f9ae04c5276cda0e4d" + integrity sha512-wI4ZiIfFxpkuxB8ju4MHrGwGLyp1+awEHAHVpx6w7a+1pmYIq8T9FGEVVwFo0iFierDoMj++Xq69GXWYn2EiwA== optionalDependencies: - esbuild-android-64 "0.14.46" - esbuild-android-arm64 "0.14.46" - esbuild-darwin-64 "0.14.46" - esbuild-darwin-arm64 "0.14.46" - esbuild-freebsd-64 "0.14.46" - esbuild-freebsd-arm64 "0.14.46" - esbuild-linux-32 "0.14.46" - esbuild-linux-64 "0.14.46" - esbuild-linux-arm "0.14.46" - esbuild-linux-arm64 "0.14.46" - esbuild-linux-mips64le "0.14.46" - esbuild-linux-ppc64le "0.14.46" - esbuild-linux-riscv64 "0.14.46" - esbuild-linux-s390x "0.14.46" - esbuild-netbsd-64 "0.14.46" - esbuild-openbsd-64 "0.14.46" - esbuild-sunos-64 "0.14.46" - esbuild-windows-32 "0.14.46" - esbuild-windows-64 "0.14.46" - esbuild-windows-arm64 "0.14.46" + esbuild-android-64 "0.14.47" + esbuild-android-arm64 "0.14.47" + esbuild-darwin-64 "0.14.47" + esbuild-darwin-arm64 "0.14.47" + esbuild-freebsd-64 "0.14.47" + esbuild-freebsd-arm64 "0.14.47" + esbuild-linux-32 "0.14.47" + esbuild-linux-64 "0.14.47" + esbuild-linux-arm "0.14.47" + esbuild-linux-arm64 "0.14.47" + esbuild-linux-mips64le "0.14.47" + esbuild-linux-ppc64le "0.14.47" + esbuild-linux-riscv64 "0.14.47" + esbuild-linux-s390x "0.14.47" + esbuild-netbsd-64 "0.14.47" + esbuild-openbsd-64 "0.14.47" + esbuild-sunos-64 "0.14.47" + esbuild-windows-32 "0.14.47" + esbuild-windows-64 "0.14.47" + esbuild-windows-arm64 "0.14.47" escalade@^3.1.1: version "3.1.1" @@ -3384,9 +3383,9 @@ jest-worker@^26.2.1: supports-color "^7.0.0" jiti@^1.12.14, jiti@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.13.0.tgz#3cdfc4e651ca0cca4c62ed5e47747b5841d41a8e" - integrity sha512-/n9mNxZj/HDSrincJ6RP+L+yXbpnB8FybySBa+IjIaoH9FIxBbrbRT5XUbe8R7zuVM2AQqNMNDDqz0bzx3znOQ== + version "1.14.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.14.0.tgz#5350fff532a4d891ca4bcd700c47c1f40e6ee326" + integrity sha512-4IwstlaKQc9vCTC+qUXLM1hajy2ImiL9KnLvVYiaHOtS/v3wRjhLlGl121AmgDgx/O43uKmxownJghS5XMya2A== js-tokens@^4.0.0: version "4.0.0" @@ -3542,7 +3541,7 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -listhen@^0.2.11, listhen@^0.2.12: +listhen@^0.2.11, listhen@^0.2.12, listhen@^0.2.13: version "0.2.13" resolved "https://registry.yarnpkg.com/listhen/-/listhen-0.2.13.tgz#bd34338fe04ff9f3f08e4f83a46eefc9104b2482" integrity sha512-axfyPgsrypKohOglPjzMVj+6nSQuDfdDzq92tYEg4HO+YkvvMGz0bGeoGA+pdEC7a8gbIgLduf/62Pkk1a9jMQ== @@ -4259,12 +4258,7 @@ mkdirp@^1.0.3: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mlly@^0.3.6: - version "0.3.19" - resolved "https://registry.yarnpkg.com/mlly/-/mlly-0.3.19.tgz#a4aac171d2142eafc9c9d4c1937dac5a11f70565" - integrity sha512-zMq5n3cOf4fOzA4WoeulxagbAgMChdev3MgP6K51k7M0u2whTXxupfIY4VVzws4vxkiWhwH1rVQcsw7zDGfRhA== - -mlly@^0.5.1, mlly@^0.5.2: +mlly@^0.5.1, mlly@^0.5.2, mlly@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mlly/-/mlly-0.5.3.tgz#8a613b6273886490a5f462ce18fa486492cf053b" integrity sha512-im69tuLD9EJh9fc9TZRpJEFvsBcGMez7glUCWDcHWWCKzhvPmNvyaYjp/+h0qJJN/Xovrs//GzGjOOKmFw4Gog== @@ -4399,9 +4393,9 @@ node-emoji@^1.11.0: lodash "^4.17.21" node-fetch-native@^0.1.2, node-fetch-native@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-0.1.3.tgz#61a4e4250d7aa6e272cacdbaa979ea916bff321a" - integrity sha512-Jf1IQZdovUIv9E+5avmN6Sf+bND+rnMlODnBQhdE2VRyuWP9WgqZb/KEgPekh19DAN1X2C4vbS1VCOaz2OH19g== + version "0.1.4" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-0.1.4.tgz#09b06754f9e298bac23848050da2352125634f89" + integrity sha512-10EKpOCQPXwZVFh3U1ptOMWBgKTbsN7Vvo6WVKt5pw4hp8zbv6ZVBZPlXw+5M6Tyi1oc1iD4/sNPd71KYA16tQ== node-fetch@^2.6.7: version "2.6.7" @@ -4838,13 +4832,13 @@ pify@^2.3.0: integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== pkg-types@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-0.3.2.tgz#1b3244b561745591035517475bc8af9c5e089e47" - integrity sha512-eBYzX/7NYsQEOR2alWY4rnQB49G62oHzFpoi9Som56aUr8vB8UGcmcIia9v8fpBeuhH3Ltentuk2OGpp4IQV3Q== + version "0.3.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-0.3.3.tgz#3c25e45274e1c586ec7811dcc3449afde846e463" + integrity sha512-6AJcCMnjUQPQv/Wk960w0TOmjhdjbeaQJoSKWRQv9N3rgkessCu6J0Ydsog/nw1MbpnxHuPzYbfOn2KmlZO1FA== dependencies: jsonc-parser "^3.0.0" - mlly "^0.3.6" - pathe "^0.2.0" + mlly "^0.5.3" + pathe "^0.3.0" plausible-tracker@^0.3.4: version "0.3.8" @@ -6026,9 +6020,9 @@ tailwind-config-viewer@^1.7.0: replace-in-file "^6.1.0" tailwindcss@^3.0.24, tailwindcss@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.3.tgz#b9ef2c1ae537c339679e8e89635af8e143d1c7eb" - integrity sha512-PRJNYdSIthrb8hjmAyymEyEN8Yo61TMXpzyFUpxULeeyRn3Y3gpvuw6FlRTKrJvK7thSGKRnhT36VovVx4WeMA== + version "3.1.4" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.4.tgz#64b09059805505902139fa805d97046080bd90b9" + integrity sha512-NrxbFV4tYsga/hpWbRyUfIaBrNMXDxx5BsHgBS4v5tlyjf+sDsgBg5m9OxjrXIqAS/uR9kicxLKP+bEHI7BSeQ== dependencies: arg "^5.0.2" chokidar "^3.5.3" @@ -6400,6 +6394,14 @@ untyped@^0.4.4: "@babel/types" "^7.17.0" scule "^0.2.1" +update-browserslist-db@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.3.tgz#6c47cb996f34afb363e924748e2f6e4d983c6fc1" + integrity sha512-ufSazemeh9Gty0qiWtoRpJ9F5Q5W3xdIPm1UZQqYQv/q0Nyb9EMHUB2lu+O9x1re9WsorpMAUu4Y6Lxcs5n+XQ== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -6413,9 +6415,9 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== uvu@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.3.tgz#3d83c5bc1230f153451877bfc7f4aea2392219ae" - integrity sha512-brFwqA3FXzilmtnIyJ+CxdkInkY/i4ErvP7uV0DnUVxQcQ55reuHphorpF+tZoVHK2MniZ/VJzI7zJQoc9T9Yw== + version "0.5.4" + resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.4.tgz#5a37482ade580b7d817569e0b2c013712857293c" + integrity sha512-x1CyUjcP9VKaNPhjeB3FIc/jqgLsz2Q9LFhRzUTu/jnaaHILEGNuE0XckQonl8ISLcwyk9I2EZvWlYsQnwxqvQ== dependencies: dequal "^2.0.0" diff "^5.0.0" diff --git a/examples/document-driven/app.vue b/examples/document-driven/app.vue new file mode 100644 index 000000000..55298c17b --- /dev/null +++ b/examples/document-driven/app.vue @@ -0,0 +1,5 @@ + diff --git a/examples/document-driven/content/about.md b/examples/document-driven/content/about.md new file mode 100644 index 000000000..b31f9628c --- /dev/null +++ b/examples/document-driven/content/about.md @@ -0,0 +1,3 @@ +# About page + +You can go back to the [home page](/). diff --git a/examples/document-driven/content/index.md b/examples/document-driven/content/index.md new file mode 100644 index 000000000..f896feced --- /dev/null +++ b/examples/document-driven/content/index.md @@ -0,0 +1,6 @@ +# Hello Nuxt Content + +Welcome to Nuxt Content Hello World example. + +Checkout the [about page](/about). + diff --git a/examples/document-driven/nuxt.config.ts b/examples/document-driven/nuxt.config.ts new file mode 100644 index 000000000..d896bcd50 --- /dev/null +++ b/examples/document-driven/nuxt.config.ts @@ -0,0 +1,11 @@ +import { defineNuxtConfig } from 'nuxt' + +export default defineNuxtConfig({ + modules: [ + '@nuxt/content', + '@nuxt/ui' + ], + content: { + documentDriven: true + } +}) diff --git a/examples/document-driven/package.json b/examples/document-driven/package.json new file mode 100644 index 000000000..42722a700 --- /dev/null +++ b/examples/document-driven/package.json @@ -0,0 +1,15 @@ +{ + "name": "example-hello-world", + "private": true, + "scripts": { + "build": "nuxt build", + "dev": "nuxt dev", + "generate": "nuxt generate", + "preview": "nuxt preview" + }, + "devDependencies": { + "@nuxt/content": "npm:@nuxt/content-edge@latest", + "@nuxt/ui": "npm:@nuxt/ui-edge@latest", + "nuxt": "npm:nuxt3@latest" + } +} diff --git a/package.json b/package.json index 28e7cb89f..4acb45723 100644 --- a/package.json +++ b/package.json @@ -24,18 +24,19 @@ ], "scripts": { "build": "nuxt-module-build", - "dev": "nuxi dev playground", - "dev:build": "nuxi build playground", - "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground", + "dev": "./scripts/playground.sh", + "dev:build": "nuxi build playground/${$1 || 'basic'}", + "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground/basic", "dev:docs": "(cd docs && nuxi dev)", - "dev:fixtures": "nuxi dev test/fixtures/basic", + "dev:fixtures": "./scripts/fixture.sh", "build:docs": "(cd docs && nuxi build)", "example": "./scripts/example.sh", "lint": "eslint --ext .js,.ts,.vue .", "prepack": "yarn build", "test:coverage": "vitest --coverage", "test:types": "tsc --build tsconfig.json", - "test:unit": "nuxi prepare test/fixtures/basic && vitest run" + "test": "./scripts/test.sh", + "test:unit": "nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/document-driven && vitest run" }, "dependencies": { "@nuxt/kit": "^3.0.0-rc.4", @@ -96,11 +97,11 @@ "eslint": "^8.18.0", "globby": "^13.1.2", "husky": "^8.0.1", - "jiti": "^1.13.0", + "jiti": "^1.14.0", "lint-staged": "^13.0.2", "nuxt": "^3.0.0-rc.4", "rehype-figure": "^1.0.1", "remark-oembed": "^1.2.2", - "vitest": "^0.15.1" + "vitest": "^0.15.2" } } diff --git a/playground/content-fa/_dir.yml b/playground/basic/content-fa/_dir.yml similarity index 100% rename from playground/content-fa/_dir.yml rename to playground/basic/content-fa/_dir.yml diff --git a/playground/content-fa/hello.md b/playground/basic/content-fa/hello.md similarity index 100% rename from playground/content-fa/hello.md rename to playground/basic/content-fa/hello.md diff --git a/playground/basic/content/0.index.md b/playground/basic/content/0.index.md new file mode 100644 index 000000000..0d0526857 --- /dev/null +++ b/playground/basic/content/0.index.md @@ -0,0 +1,9 @@ +--- +title: Index +--- + +# 🎨 Playground + +- [Playground](/playground) +- [Query Builder](/query-playground) +- [Not found](/404) diff --git a/playground/content/real-content/content.md b/playground/basic/content/1.real-content/content.md similarity index 100% rename from playground/content/real-content/content.md rename to playground/basic/content/1.real-content/content.md diff --git a/playground/content/real-content/query.md b/playground/basic/content/1.real-content/query.md similarity index 100% rename from playground/content/real-content/query.md rename to playground/basic/content/1.real-content/query.md diff --git a/playground/content/features/1.unwrap.md b/playground/basic/content/2.features/1.unwrap.md similarity index 100% rename from playground/content/features/1.unwrap.md rename to playground/basic/content/2.features/1.unwrap.md diff --git a/playground/content/features/2.excerpt.md b/playground/basic/content/2.features/2.excerpt.md similarity index 100% rename from playground/content/features/2.excerpt.md rename to playground/basic/content/2.features/2.excerpt.md diff --git a/playground/content/features/3.mdc-highlighter.md b/playground/basic/content/2.features/3.mdc-highlighter.md similarity index 100% rename from playground/content/features/3.mdc-highlighter.md rename to playground/basic/content/2.features/3.mdc-highlighter.md diff --git a/playground/basic/content/2.features/4.path-overwrite.md b/playground/basic/content/2.features/4.path-overwrite.md new file mode 100644 index 000000000..356e73cba --- /dev/null +++ b/playground/basic/content/2.features/4.path-overwrite.md @@ -0,0 +1,6 @@ +--- +title: 'Path overwriting' +_path: '/features/overwrited-path' +--- + +# Path overwriting diff --git a/playground/content/empty.md b/playground/basic/content/2.features/5.empty-document.md similarity index 100% rename from playground/content/empty.md rename to playground/basic/content/2.features/5.empty-document.md diff --git a/playground/content/file-formats/csv.csv b/playground/basic/content/3.file-formats/csv.csv similarity index 100% rename from playground/content/file-formats/csv.csv rename to playground/basic/content/3.file-formats/csv.csv diff --git a/playground/content/file-formats/json.json b/playground/basic/content/3.file-formats/json.json similarity index 100% rename from playground/content/file-formats/json.json rename to playground/basic/content/3.file-formats/json.json diff --git a/playground/content/file-formats/json5.json5 b/playground/basic/content/3.file-formats/json5.json5 similarity index 100% rename from playground/content/file-formats/json5.json5 rename to playground/basic/content/3.file-formats/json5.json5 diff --git a/playground/content/file-formats/yaml.yml b/playground/basic/content/3.file-formats/yaml.yml similarity index 100% rename from playground/content/file-formats/yaml.yml rename to playground/basic/content/3.file-formats/yaml.yml diff --git a/playground/basic/content/98.playground.md b/playground/basic/content/98.playground.md new file mode 100644 index 000000000..a916681c8 --- /dev/null +++ b/playground/basic/content/98.playground.md @@ -0,0 +1,6 @@ +--- +title: Playground +--- + +::playground +:: diff --git a/playground/basic/content/99.query-playground.md b/playground/basic/content/99.query-playground.md new file mode 100644 index 000000000..7d1d54de9 --- /dev/null +++ b/playground/basic/content/99.query-playground.md @@ -0,0 +1,6 @@ +--- +title: Query Playground +--- + +::query-playground +:: diff --git a/playground/content/_partials/cards.yml b/playground/basic/content/_partials/cards.yml similarity index 100% rename from playground/content/_partials/cards.yml rename to playground/basic/content/_partials/cards.yml diff --git a/playground/content/_partials/hello-world.md b/playground/basic/content/_partials/hello-world.md similarity index 100% rename from playground/content/_partials/hello-world.md rename to playground/basic/content/_partials/hello-world.md diff --git a/playground/basic/nuxt.config.ts b/playground/basic/nuxt.config.ts new file mode 100644 index 000000000..eecae2f4d --- /dev/null +++ b/playground/basic/nuxt.config.ts @@ -0,0 +1,16 @@ +import { defineNuxtConfig } from 'nuxt' +import { resolve } from 'pathe' + +export default defineNuxtConfig({ + extends: ['../shared'], + content: { + sources: [ + { + name: 'translation-fa', + prefix: '/fa', + driver: 'fs', + base: resolve(__dirname, 'content-fa') + } + ] + } +}) diff --git a/playground/basic/pages/[...slug].vue b/playground/basic/pages/[...slug].vue new file mode 100644 index 000000000..7abf428fc --- /dev/null +++ b/playground/basic/pages/[...slug].vue @@ -0,0 +1,21 @@ + + + + + diff --git a/playground/basic/pages/playground.vue b/playground/basic/pages/playground.vue new file mode 100644 index 000000000..5eaf15fbb --- /dev/null +++ b/playground/basic/pages/playground.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/playground/basic/pages/query-playground.vue b/playground/basic/pages/query-playground.vue new file mode 100644 index 000000000..5eaf15fbb --- /dev/null +++ b/playground/basic/pages/query-playground.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/playground/public/favicon.ico b/playground/basic/public/favicon.ico similarity index 100% rename from playground/public/favicon.ico rename to playground/basic/public/favicon.ico diff --git a/playground/content/1.index.md b/playground/content/1.index.md deleted file mode 100644 index 93a521733..000000000 --- a/playground/content/1.index.md +++ /dev/null @@ -1,9 +0,0 @@ -# Hello World! - -Index page. - -- [Playground](/playground) -- [Query Builder](/query) -- [Sandbox](/sandbox) -- [Empty](/empty) -- [Not found](/not-found) diff --git a/playground/content/_test.md b/playground/content/_test.md deleted file mode 100644 index 66ef82ff4..000000000 --- a/playground/content/_test.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -navigation: false ---- - -# Hello World! - -This is a test page! diff --git a/playground/content/features/4.navigation.md b/playground/content/features/4.navigation.md deleted file mode 100644 index cc0be1e56..000000000 --- a/playground/content/features/4.navigation.md +++ /dev/null @@ -1 +0,0 @@ -# Hello World! diff --git a/playground/content/toto.md b/playground/content/toto.md deleted file mode 100644 index 9693fa796..000000000 --- a/playground/content/toto.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -_path: '/titi' ---- - -# Toto 2 diff --git a/playground/document-driven/components/content/Debug.vue b/playground/document-driven/components/content/Debug.vue new file mode 100644 index 000000000..1bd40644a --- /dev/null +++ b/playground/document-driven/components/content/Debug.vue @@ -0,0 +1,36 @@ + + + diff --git a/playground/document-driven/composables/useTheme.ts b/playground/document-driven/composables/useTheme.ts new file mode 100644 index 000000000..7e4173e7b --- /dev/null +++ b/playground/document-driven/composables/useTheme.ts @@ -0,0 +1,9 @@ +import { useDocumentDriven } from '#imports' + +export const useTheme = () => { + const { globals } = useDocumentDriven() + + const theme = computed(() => globals.value?.theme) + + return theme +} diff --git a/playground/document-driven/content/0.index.md b/playground/document-driven/content/0.index.md new file mode 100644 index 000000000..f3c858066 --- /dev/null +++ b/playground/document-driven/content/0.index.md @@ -0,0 +1,3 @@ +# Home + +Hello World! diff --git a/playground/document-driven/content/1.debug.md b/playground/document-driven/content/1.debug.md new file mode 100644 index 000000000..c594ec203 --- /dev/null +++ b/playground/document-driven/content/1.debug.md @@ -0,0 +1,6 @@ +# Debug + +::debug +:: + +`useTheme()` is built on top of `globals` key. diff --git a/playground/document-driven/content/2.layout.md b/playground/document-driven/content/2.layout.md new file mode 100644 index 000000000..cb2e7fc50 --- /dev/null +++ b/playground/document-driven/content/2.layout.md @@ -0,0 +1,9 @@ +--- +layout: reversed +--- + +# Layout + +This page uses `reversed` layout. + +Navigation should be on bottom. diff --git a/playground/document-driven/content/4.redirect.md b/playground/document-driven/content/4.redirect.md new file mode 100644 index 000000000..ab2cf733c --- /dev/null +++ b/playground/document-driven/content/4.redirect.md @@ -0,0 +1,5 @@ +--- +redirect: /redirect-target +--- + +This page should redirect to `/redirect-target`. diff --git a/playground/document-driven/content/5.redirect-target.md b/playground/document-driven/content/5.redirect-target.md new file mode 100644 index 000000000..d6cb603bc --- /dev/null +++ b/playground/document-driven/content/5.redirect-target.md @@ -0,0 +1,13 @@ +--- +navigation: false +--- + +You have been redirect to this page from `/redirect`. + +It uses: + +```md +--- +redirect: /redirect-target +--- +``` diff --git a/playground/document-driven/content/6.empty-file.md b/playground/document-driven/content/6.empty-file.md new file mode 100644 index 000000000..e69de29bb diff --git a/playground/document-driven/content/_theme.yml b/playground/document-driven/content/_theme.yml new file mode 100644 index 000000000..4cdafb27e --- /dev/null +++ b/playground/document-driven/content/_theme.yml @@ -0,0 +1 @@ +test: 'Hello World' diff --git a/playground/app.vue b/playground/document-driven/layouts/reversed.vue similarity index 78% rename from playground/app.vue rename to playground/document-driven/layouts/reversed.vue index 85c8d71e4..5a8dfd8c6 100644 --- a/playground/app.vue +++ b/playground/document-driven/layouts/reversed.vue @@ -1,8 +1,10 @@ @@ -10,5 +12,7 @@ body, html { margin: 0; padding: 0; + min-height: 100vh; + min-width: 100vw; } diff --git a/playground/document-driven/nuxt.config.ts b/playground/document-driven/nuxt.config.ts new file mode 100644 index 000000000..88146fabc --- /dev/null +++ b/playground/document-driven/nuxt.config.ts @@ -0,0 +1,17 @@ +import { defineNuxtConfig } from 'nuxt' + +export default defineNuxtConfig({ + extends: ['../shared'], + content: { + documentDriven: { + globals: { + theme: { + where: { + _id: 'content:_theme.yml' + }, + without: ['_'] + } + } + } + } +}) diff --git a/playground/pages/[...slug].vue b/playground/pages/[...slug].vue deleted file mode 100644 index 693f07c87..000000000 --- a/playground/pages/[...slug].vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/playground/pages/sandbox.vue b/playground/pages/sandbox.vue deleted file mode 100644 index 5f954037a..000000000 --- a/playground/pages/sandbox.vue +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/playground/components/NavItem.vue b/playground/shared/components/NavItem.vue similarity index 100% rename from playground/components/NavItem.vue rename to playground/shared/components/NavItem.vue diff --git a/playground/components/NuxtLoadingBar.vue b/playground/shared/components/NuxtLoadingBar.vue similarity index 100% rename from playground/components/NuxtLoadingBar.vue rename to playground/shared/components/NuxtLoadingBar.vue diff --git a/playground/components/PageNav.vue b/playground/shared/components/PageNav.vue similarity index 52% rename from playground/components/PageNav.vue rename to playground/shared/components/PageNav.vue index 503cb29ab..c412fde55 100644 --- a/playground/components/PageNav.vue +++ b/playground/shared/components/PageNav.vue @@ -15,18 +15,18 @@ watch( diff --git a/playground/components/PagePrevNext.vue b/playground/shared/components/PagePrevNext.vue similarity index 100% rename from playground/components/PagePrevNext.vue rename to playground/shared/components/PagePrevNext.vue diff --git a/playground/pages/playground.vue b/playground/shared/components/Playground.vue similarity index 90% rename from playground/pages/playground.vue rename to playground/shared/components/Playground.vue index 7071bca27..c721e3d89 100644 --- a/playground/pages/playground.vue +++ b/playground/shared/components/Playground.vue @@ -1,4 +1,6 @@