Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit ded5699

Browse files
authored
chore: 📦 update Docus (#485)
1 parent 1e423c3 commit ded5699

26 files changed

+2649
-2907
lines changed

docs/content/en/examples/useFetch.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/content/en/helpers/useContext.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/content/settings.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/docus.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default {
2+
title: 'Nuxt Composition API',
3+
url: 'https://composition-api.nuxtjs.org',
4+
twitter: "nuxt_js",
5+
github: {
6+
repo: 'nuxt-community/composition-api',
7+
branch: 'main'
8+
}
9+
}

docs/nuxt.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@ import { withDocus } from 'docus'
22

33
// Learn more at https://docus.dev
44
export default withDocus({
5-
generate: {
6-
routes: ['/'],
7-
exclude: [/\/example/, /\/fixture/],
8-
},
5+
rootDir: __dirname,
96
})

docs/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"now-build": "yarn generate"
77
},
88
"devDependencies": {
9-
"docus": "^0.1.5",
10-
"nuxt": "^2.15.4"
9+
"docus": "^0.5.6"
1110
}
1211
}

docs/content/en/index.md renamed to docs/pages/en/1.getting-started/1.introduction.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
---
22
title: Introduction
33
description: '@nuxtjs/composition-api provides a way to use the Vue 3 Composition API with Nuxt-specific features.'
4-
category: Getting started
5-
position: 1
6-
items:
7-
- Support for the new Nuxt fetch in v2.12+
8-
- Easy access to router, app, store within setup()
9-
- Interact directly with your vue-meta properties within setup()
10-
- Drop-in replacement for ref with automatic SSR stringification and hydration (ssrRef)
11-
- Written in TypeScript
124
---
135

146
> `@nuxtjs/composition-api` provides a way to use the Vue 3 Composition API in with Nuxt-specific features.
@@ -17,7 +9,15 @@ items:
179

1810
## Key features
1911

20-
<d-list :items="items"></d-list>
12+
:::list{type="primary"}
13+
14+
- Support for the new Nuxt fetch in v2.12+
15+
- Easy access to router, app, store within setup()
16+
- Interact directly with your vue-meta properties within setup()
17+
- Drop-in replacement for ref with automatic SSR stringification and hydration (ssrRef)
18+
- Written in TypeScript
19+
20+
:::
2121

2222
## API reference
2323

docs/content/en/getting-started/setup.md renamed to docs/pages/en/1.getting-started/2.setup.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
---
22
title: Quick start
33
description: 'Getting started with the Nuxt Composition API.'
4-
category: Getting started
5-
position: 2
6-
version: 0.225
74
---
85

96
## Quick start
107

118
1. First, install `@nuxtjs/composition-api`:
129

13-
<d-code-group>
14-
<d-code-block label="Yarn" active>
10+
::::code-group
11+
::::code-block{label="Yarn" active}
1512

1613
```bash
1714
yarn add @nuxtjs/composition-api
1815
```
1916

20-
</d-code-block><d-code-block label="NPM">
17+
::::
18+
::::code-block{label="NPM"}
2119

2220
```bash
2321
npm install @nuxtjs/composition-api --save
2422
```
2523

26-
</d-code-block>
27-
</d-code-group>
24+
::::
25+
:::::
2826

2927
2. Enable the module.
3028

@@ -51,10 +49,10 @@ version: 0.225
5149

5250
4. You're good to go!
5351

54-
<d-alert type="info">
52+
:::alert{type="info"}
5553

5654
- The module automatically installs [`@vue/composition-api`](https://github.com/vuejs/composition-api) as a plugin, so you do not need to enable it separately.
5755

5856
- For convenience, this package also exports the [`@vue/composition-api`](https://github.com/vuejs/composition-api) methods and hooks, so you can import directly from `@nuxtjs/composition-api`.
5957

60-
</d-alert>
58+
:::

docs/content/en/getting-started/gotchas.md renamed to docs/pages/en/1.getting-started/3.gotchas.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
---
22
title: Gotchas
33
description: 'There are a couple of points that you should be aware of when using `@nuxtjs/composition-api`.'
4-
category: Getting started
5-
fullscreen: True
6-
position: 3
7-
version: 0.133
84
---
95

106
## **'Keyed' functions**

docs/content/en/packages/routes.md renamed to docs/pages/en/2.packages/1.routes.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
---
22
title: useRoute, useRouter
33
description: 'Access this.$route and this.$router with the Nuxt Composition API.'
4-
category: Packages
5-
position: 12
6-
version: 0.201
74
---
85

96
In Vue 3, `vue-router` exports composition functions for accessing the current route and router.
@@ -25,7 +22,9 @@ export default defineComponent({
2522
})
2623
```
2724

28-
<d-alert>When migrating to Nuxt 3 you will need to remove `.value` as the native equivalent returns a reactive object, not a computed object.</d-alert>
25+
:::alert
26+
When migrating to Nuxt 3 you will need to remove `.value` as the native equivalent returns a reactive object, not a computed object.
27+
:::
2928

3029
## useRouter
3130

0 commit comments

Comments
 (0)