docus 5.6.1 → 5.8.0
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/app/app.vue +13 -1
- package/app/assets/icons/LICENSE +14 -0
- package/app/assets/icons/ai.svg +1 -0
- package/app/components/LanguageSelect.vue +1 -4
- package/app/components/OgImage/OgImageDocs.vue +2 -4
- package/app/components/OgImage/OgImageLanding.vue +36 -13
- package/app/components/app/AppFooterRight.vue +32 -14
- package/app/components/app/AppHeader.vue +10 -0
- package/app/components/app/AppHeaderBottom.vue +20 -0
- package/app/components/app/AppHeaderBottomRight.vue +3 -0
- package/app/components/docs/DocsAsideLeftBody.vue +2 -4
- package/app/components/docs/DocsAsideLeftTop.vue +18 -1
- package/app/components/docs/DocsAsideMobileBar.vue +88 -0
- package/app/components/docs/DocsAsideRight.vue +33 -0
- package/app/components/docs/DocsAsideRightBottom.vue +1 -1
- package/app/composables/useDocusI18n.ts +21 -5
- package/app/composables/useLogoAssets.ts +1 -1
- package/app/composables/useSubNavigation.ts +55 -0
- package/app/pages/[[lang]]/[...slug].vue +4 -13
- package/i18n/locales/ar.json +1 -0
- package/i18n/locales/be.json +1 -0
- package/i18n/locales/bg.json +1 -0
- package/i18n/locales/bn.json +1 -0
- package/i18n/locales/ca.json +1 -0
- package/i18n/locales/ckb.json +1 -0
- package/i18n/locales/cs.json +1 -0
- package/i18n/locales/da.json +1 -0
- package/i18n/locales/de.json +1 -0
- package/i18n/locales/el.json +1 -0
- package/i18n/locales/en.json +1 -0
- package/i18n/locales/es.json +1 -0
- package/i18n/locales/et.json +1 -0
- package/i18n/locales/fi.json +1 -0
- package/i18n/locales/fr.json +1 -0
- package/i18n/locales/he.json +1 -0
- package/i18n/locales/hi.json +1 -0
- package/i18n/locales/hy.json +1 -0
- package/i18n/locales/id.json +1 -0
- package/i18n/locales/it.json +1 -0
- package/i18n/locales/ja.json +1 -0
- package/i18n/locales/kk.json +1 -0
- package/i18n/locales/km.json +1 -0
- package/i18n/locales/ko.json +1 -0
- package/i18n/locales/ky.json +1 -0
- package/i18n/locales/lb.json +1 -0
- package/i18n/locales/ms.json +1 -0
- package/i18n/locales/nb.json +1 -0
- package/i18n/locales/nl.json +1 -0
- package/i18n/locales/pl.json +1 -0
- package/i18n/locales/pt-BR.json +1 -0
- package/i18n/locales/ro.json +1 -0
- package/i18n/locales/ru.json +1 -0
- package/i18n/locales/si.json +1 -0
- package/i18n/locales/sl.json +1 -0
- package/i18n/locales/sv.json +1 -0
- package/i18n/locales/tr.json +1 -0
- package/i18n/locales/uk.json +1 -0
- package/i18n/locales/ur.json +1 -0
- package/i18n/locales/vi.json +1 -0
- package/i18n/locales/zh-CN.json +1 -0
- package/modules/assistant/runtime/components/AssistantChat.vue +2 -2
- package/modules/assistant/runtime/components/AssistantPanel.vue +1 -1
- package/modules/assistant/runtime/components/AssistantPreStream.vue +1 -1
- package/modules/assistant/runtime/composables/useAssistant.ts +7 -3
- package/modules/assistant/runtime/server/api/search.ts +3 -2
- package/modules/config.ts +18 -6
- package/modules/markdown-rewrite.ts +7 -3
- package/modules/routing.ts +4 -1
- package/nuxt.config.ts +24 -2
- package/nuxt.schema.ts +15 -1
- package/package.json +13 -14
- package/server/mcp/tools/get-page.ts +2 -4
- package/server/mcp/tools/list-pages.ts +2 -1
- package/server/routes/sitemap.xml.ts +3 -3
|
@@ -24,7 +24,7 @@ WORKFLOW: This tool returns the complete page content including title, descripti
|
|
|
24
24
|
handler: async ({ path }) => {
|
|
25
25
|
const event = useEvent()
|
|
26
26
|
const config = useRuntimeConfig(event).public
|
|
27
|
-
const siteUrl =
|
|
27
|
+
const siteUrl = getRequestURL(event).origin || inferSiteURL()
|
|
28
28
|
|
|
29
29
|
const availableLocales = getAvailableLocales(config)
|
|
30
30
|
const collectionName = config.i18n?.locales
|
|
@@ -41,9 +41,7 @@ WORKFLOW: This tool returns the complete page content including title, descripti
|
|
|
41
41
|
return errorResult('Page not found')
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
const content = await
|
|
45
|
-
baseURL: siteUrl,
|
|
46
|
-
})
|
|
44
|
+
const content = await event.$fetch<string>(`/raw${path}.md`)
|
|
47
45
|
|
|
48
46
|
return jsonResult({
|
|
49
47
|
title: page.title,
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod'
|
|
|
2
2
|
import { queryCollection } from '@nuxt/content/server'
|
|
3
3
|
import type { Collections } from '@nuxt/content'
|
|
4
4
|
import { getCollectionsToQuery, getAvailableLocales } from '../../utils/content'
|
|
5
|
+
import { inferSiteURL } from '../../../utils/meta'
|
|
5
6
|
|
|
6
7
|
export default defineMcpTool({
|
|
7
8
|
description: `Lists all available documentation pages with their categories and basic information.
|
|
@@ -30,7 +31,7 @@ OUTPUT: Returns a structured list with:
|
|
|
30
31
|
const event = useEvent()
|
|
31
32
|
const config = useRuntimeConfig(event).public
|
|
32
33
|
|
|
33
|
-
const siteUrl =
|
|
34
|
+
const siteUrl = getRequestURL(event).origin || inferSiteURL()
|
|
34
35
|
const availableLocales = getAvailableLocales(config)
|
|
35
36
|
const collections = getCollectionsToQuery(locale, availableLocales)
|
|
36
37
|
|
|
@@ -27,11 +27,11 @@ export default defineEventHandler(async (event) => {
|
|
|
27
27
|
|
|
28
28
|
for (const collection of collections) {
|
|
29
29
|
try {
|
|
30
|
-
const pages = await queryCollection(event, collection
|
|
30
|
+
const pages = await (queryCollection as unknown as (event: unknown, collection: string) => { all: () => Promise<Array<Record<string, unknown> & { path?: string }>> })(event, collection).all()
|
|
31
31
|
|
|
32
32
|
for (const page of pages) {
|
|
33
|
-
const meta = page as
|
|
34
|
-
const pagePath =
|
|
33
|
+
const meta = page as Record<string, unknown>
|
|
34
|
+
const pagePath = page.path || '/'
|
|
35
35
|
|
|
36
36
|
// Skip pages with sitemap: false in frontmatter
|
|
37
37
|
if (meta.sitemap === false) continue
|