docus 4.1.1 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/app/templates/landing.vue +0 -3
- package/modules/routing.ts +9 -4
- package/nuxt.config.ts +7 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/docus)
|
|
8
8
|
[](https://www.npmjs.com/package/docus)
|
|
9
9
|
|
|
10
|
-
This is the official Nuxt layer for [Docus](https://docus.dev), providing a complete documentation theming. It works with the [Docus CLI](https://github.com/
|
|
10
|
+
This is the official Nuxt layer for [Docus](https://docus.dev), providing a complete documentation theming. It works with the [Docus CLI](https://github.com/nuxt-content/docus/tree/main/cli) for rapid project setup.
|
|
11
11
|
|
|
12
12
|
## 🚀 Features
|
|
13
13
|
|
|
@@ -108,8 +108,8 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
108
108
|
## 📞 Support
|
|
109
109
|
|
|
110
110
|
- 📖 [Documentation](https://docus.dev)
|
|
111
|
-
- 🐛 [Issues](https://github.com/
|
|
112
|
-
- 💬 [Discussions](https://github.com/
|
|
111
|
+
- 🐛 [Issues](https://github.com/nuxt-content/docus/issues)
|
|
112
|
+
- 💬 [Discussions](https://github.com/nuxt-content/docus/discussions)
|
|
113
113
|
|
|
114
114
|
---
|
|
115
115
|
|
|
@@ -12,8 +12,6 @@ if (!page.value) {
|
|
|
12
12
|
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
// Reconsider it once this is implemented: https://github.com/nuxt/content/issues/3419
|
|
16
|
-
const prose = page.value.meta?.prose as boolean
|
|
17
15
|
const title = page.value.seo?.title || page.value.title
|
|
18
16
|
const description = page.value.seo?.description || page.value.description
|
|
19
17
|
|
|
@@ -42,6 +40,5 @@ else {
|
|
|
42
40
|
<ContentRenderer
|
|
43
41
|
v-if="page"
|
|
44
42
|
:value="page"
|
|
45
|
-
:prose="prose || false"
|
|
46
43
|
/>
|
|
47
44
|
</template>
|
package/modules/routing.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, extendPages, createResolver
|
|
1
|
+
import { defineNuxtModule, extendPages, createResolver } from '@nuxt/kit'
|
|
2
2
|
|
|
3
3
|
export default defineNuxtModule({
|
|
4
4
|
meta: {
|
|
@@ -9,9 +9,14 @@ export default defineNuxtModule({
|
|
|
9
9
|
|
|
10
10
|
const isI18nEnabled = !!(nuxt.options.i18n && nuxt.options.i18n.locales)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
// Ensure useDocusI18n is available in the app
|
|
13
|
+
nuxt.hook('imports:extend', (imports) => {
|
|
14
|
+
if (imports.some(i => i.name === 'useDocusI18n')) return
|
|
15
|
+
|
|
16
|
+
imports.push({
|
|
17
|
+
name: 'useDocusI18n',
|
|
18
|
+
from: resolve('../app/composables/useDocusI18n'),
|
|
19
|
+
})
|
|
15
20
|
})
|
|
16
21
|
|
|
17
22
|
extendPages((pages) => {
|
package/nuxt.config.ts
CHANGED
|
@@ -33,6 +33,13 @@ export default defineNuxtConfig({
|
|
|
33
33
|
highlight: {
|
|
34
34
|
langs: ['bash', 'diff', 'json', 'js', 'ts', 'html', 'css', 'vue', 'shell', 'mdc', 'md', 'yaml'],
|
|
35
35
|
},
|
|
36
|
+
remarkPlugins: {
|
|
37
|
+
'remark-mdc': {
|
|
38
|
+
options: {
|
|
39
|
+
autoUnwrap: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
36
43
|
},
|
|
37
44
|
},
|
|
38
45
|
},
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docus",
|
|
3
3
|
"description": "Nuxt layer for Docus documentation theme",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/nuxt-content/docus.git"
|
|
10
10
|
},
|
|
11
11
|
"private": false,
|
|
12
12
|
"license": "MIT",
|