@lupinum/ginko-docs 0.4.0-rc.1 → 0.4.0-rc.2
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
CHANGED
|
@@ -29,7 +29,7 @@ Use this package when a Nuxt application needs documentation routes, navigation,
|
|
|
29
29
|
## Installation
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
pnpm add -D @lupinum/ginko-docs@0.4.0-rc.
|
|
32
|
+
pnpm add -D @lupinum/ginko-docs@0.4.0-rc.2 @lupinum/ginko-content@1.0.0-beta.5
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
```ts
|
package/app/app.vue
CHANGED
|
@@ -18,6 +18,7 @@ const siteUrl = docsConfig.site.url;
|
|
|
18
18
|
|
|
19
19
|
useSeoMeta({
|
|
20
20
|
ogSiteName: computed(() => getLocalizedSiteText(docsConfig.site.name, locale.value)),
|
|
21
|
+
ogType: "website",
|
|
21
22
|
ogUrl: canonicalUrl,
|
|
22
23
|
twitterCard: "summary_large_image",
|
|
23
24
|
});
|
|
@@ -35,6 +36,15 @@ useSchemaJsonLd(() => [
|
|
|
35
36
|
url: siteUrl,
|
|
36
37
|
inLanguage: locale.value,
|
|
37
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"@type": "SoftwareApplication",
|
|
41
|
+
name: getLocalizedSiteText(docsConfig.site.name, locale.value),
|
|
42
|
+
description: getLocalizedSiteText(docsConfig.site.description, locale.value),
|
|
43
|
+
url: siteUrl,
|
|
44
|
+
applicationCategory: "DeveloperApplication",
|
|
45
|
+
operatingSystem: "Web",
|
|
46
|
+
...(docsConfig.social?.github ? { sameAs: [docsConfig.social.github] } : {}),
|
|
47
|
+
},
|
|
38
48
|
]);
|
|
39
49
|
|
|
40
50
|
useHead(() => ({
|
package/nuxt.config.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { i18nPages } from "./i18n/routes";
|
|
|
10
10
|
import { defaultLocale, localeCodes, locales, localizedPath } from "./i18n/locales";
|
|
11
11
|
import { routeSlugs } from "./shared/route-slugs";
|
|
12
12
|
import { layerIconCollections, layerIconNames } from "./icon-bundle";
|
|
13
|
+
import packageMetadata from "./package.json" with { type: "json" };
|
|
13
14
|
|
|
14
15
|
const root = dirname(fileURLToPath(import.meta.url));
|
|
15
16
|
const app = join(root, "app");
|
|
@@ -56,7 +57,7 @@ export default defineNuxtConfig({
|
|
|
56
57
|
},
|
|
57
58
|
mcp: {
|
|
58
59
|
name: "Ginko Docs",
|
|
59
|
-
version:
|
|
60
|
+
version: packageMetadata.version,
|
|
60
61
|
},
|
|
61
62
|
components: {
|
|
62
63
|
dirs: [
|
|
@@ -163,7 +164,7 @@ export default defineNuxtConfig({
|
|
|
163
164
|
},
|
|
164
165
|
search: { engine: "minisearch" },
|
|
165
166
|
sitemap: true,
|
|
166
|
-
agent: { routes: true, linkHeaders: true,
|
|
167
|
+
agent: { routes: true, linkHeaders: true, delivery: "static" },
|
|
167
168
|
},
|
|
168
169
|
sitemap: {
|
|
169
170
|
excludeAppSources: ["nuxt:prerender"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lupinum/ginko-docs",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.2",
|
|
4
4
|
"description": "A Nuxt documentation layer powered by Ginko Content.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"content",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"zod": "^4.4.3"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@lupinum/ginko-content": ">=1.0.0-beta.
|
|
89
|
+
"@lupinum/ginko-content": ">=1.0.0-beta.5 <2.0.0",
|
|
90
90
|
"nuxt": ">=4.5.1 <5",
|
|
91
91
|
"vue": "^3.5.35",
|
|
92
92
|
"vue-router": "^5.1.0"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { setResponseHeaders } from "h3";
|
|
2
|
+
import { useAppConfig } from "#imports";
|
|
3
|
+
import { createGinkoDocsAiCatalog } from "../../utils/mcp-server-card";
|
|
4
|
+
|
|
5
|
+
export default defineEventHandler((event) => {
|
|
6
|
+
setResponseHeaders(event, {
|
|
7
|
+
"access-control-allow-origin": "*",
|
|
8
|
+
"cache-control": "public, max-age=3600",
|
|
9
|
+
"content-type": "application/ai-catalog+json; charset=utf-8",
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
return createGinkoDocsAiCatalog(useAppConfig().ginkoDocs.site.url);
|
|
13
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { setResponseHeaders } from "h3";
|
|
2
|
+
import { useAppConfig } from "#imports";
|
|
3
|
+
import packageMetadata from "../../../package.json" with { type: "json" };
|
|
4
|
+
import { createGinkoDocsServerCard } from "../../utils/mcp-server-card";
|
|
5
|
+
|
|
6
|
+
export default defineEventHandler((event) => {
|
|
7
|
+
setResponseHeaders(event, {
|
|
8
|
+
"access-control-allow-origin": "*",
|
|
9
|
+
"cache-control": "public, max-age=3600",
|
|
10
|
+
"content-type": "application/mcp-server-card+json; charset=utf-8",
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
return createGinkoDocsServerCard({
|
|
14
|
+
origin: useAppConfig().ginkoDocs.site.url,
|
|
15
|
+
version: packageMetadata.version,
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface GinkoDocsServerCardOptions {
|
|
2
|
+
origin: string;
|
|
3
|
+
version: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export function createGinkoDocsServerCard({ origin, version }: GinkoDocsServerCardOptions) {
|
|
7
|
+
const baseUrl = new URL(origin);
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
$schema: "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",
|
|
11
|
+
name: "dev.lupinum/ginko-docs",
|
|
12
|
+
title: "Ginko Docs",
|
|
13
|
+
version,
|
|
14
|
+
description: "Read published Ginko Docs pages through its public MCP tools.",
|
|
15
|
+
websiteUrl: new URL("/docs/features/agent-readable-output", baseUrl).toString(),
|
|
16
|
+
repository: {
|
|
17
|
+
source: "github",
|
|
18
|
+
url: "https://github.com/lupinum-dev/ginko-docs",
|
|
19
|
+
},
|
|
20
|
+
remotes: [
|
|
21
|
+
{
|
|
22
|
+
type: "streamable-http",
|
|
23
|
+
url: new URL("/mcp", baseUrl).toString(),
|
|
24
|
+
supportedProtocolVersions: ["2025-11-25"],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
} as const;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createGinkoDocsAiCatalog(origin: string) {
|
|
31
|
+
const baseUrl = new URL(origin);
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
specVersion: "1.0",
|
|
35
|
+
entries: [
|
|
36
|
+
{
|
|
37
|
+
identifier: "urn:air:ginko-docs.lupinum.com:mcp:ginko-docs",
|
|
38
|
+
displayName: "Ginko Docs MCP Server",
|
|
39
|
+
type: "application/mcp-server-card+json",
|
|
40
|
+
description: "Read the public Ginko Docs documentation through MCP.",
|
|
41
|
+
url: new URL("/mcp/server-card", baseUrl).toString(),
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
} as const;
|
|
45
|
+
}
|