@lupinum/ginko-content 0.1.1 → 0.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 +34 -4
- package/compatibility.json +2 -2
- package/dist/cli.mjs +373 -278
- package/dist/cms-import/index.js +5 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/core/cache-hints.d.ts +9 -1
- package/dist/core/content/collection.js +1 -1
- package/dist/core/content/path.js +1 -1
- package/dist/core/errors.js +5 -1
- package/dist/core/provider-errors +1 -0
- package/dist/core/provider-errors.d.ts +10 -0
- package/dist/core/provider-errors.js +27 -0
- package/dist/core/query/execute.js +12 -3
- package/dist/core/query/filter.js +2 -2
- package/dist/core/query/lower.js +5 -4
- package/dist/core/references/schema.d.ts +1 -0
- package/dist/core/references/schema.js +33 -10
- package/dist/features/navigation/build.js +14 -6
- package/dist/features/navigation/canonical.js +1 -1
- package/dist/features/sitemap/query.js +2 -2
- package/dist/integrations/nitro/ingest.d.ts +3 -3
- package/dist/integrations/nitro/ingest.js +3 -3
- package/dist/integrations/nitro/storage.js +3 -1
- package/dist/module.d.mts +216 -532
- package/dist/module.json +1 -1
- package/dist/module.mjs +1250 -718
- package/dist/parsers/csv.js +4 -3
- package/dist/parsers/index.d.ts +2 -5
- package/dist/parsers/index.js +2 -2
- package/dist/parsers/markdown-plugins.d.ts +1 -0
- package/dist/parsers/markdown-plugins.js +83 -1
- package/dist/parsers/markdown.js +1 -1
- package/dist/public/client.d.ts +5 -2
- package/dist/public/client.js +4 -2
- package/dist/public/provider-errors.d.ts +2 -1
- package/dist/public/provider-errors.js +1 -18
- package/dist/public/provider.d.ts +3 -10
- package/dist/public/server.d.ts +6 -1
- package/dist/public/server.js +33 -0
- package/dist/runtime/agent-paths +1 -0
- package/dist/runtime/agent-paths.d.ts +6 -0
- package/dist/runtime/agent-paths.js +41 -0
- package/dist/runtime/app/components/ContentRenderer.vue +9 -5
- package/dist/runtime/app/components/internal/MarkdownRenderer.d.ts +1 -1
- package/dist/runtime/app/composables/head.d.ts +30 -3
- package/dist/runtime/app/composables/head.js +83 -78
- package/dist/runtime/app/composables/hot-reload +1 -0
- package/dist/runtime/app/composables/hot-reload.d.ts +5 -0
- package/dist/runtime/app/composables/hot-reload.js +15 -0
- package/dist/runtime/app/composables/locale-context.d.ts +1 -1
- package/dist/runtime/app/composables/locale-context.js +2 -1
- package/dist/runtime/app/composables/locale.js +2 -2
- package/dist/runtime/app/composables/query-api.d.ts +9 -10
- package/dist/runtime/app/composables/search.d.ts +4 -4
- package/dist/runtime/app/composables/search.js +19 -9
- package/dist/runtime/app/composables/use-content-document +1 -0
- package/dist/runtime/app/composables/use-content-document.d.ts +29 -0
- package/dist/runtime/app/composables/use-content-document.js +44 -0
- package/dist/runtime/app/composables/use-content-list +1 -0
- package/dist/runtime/app/composables/use-content-list.d.ts +43 -0
- package/dist/runtime/app/composables/use-content-list.js +98 -0
- package/dist/runtime/app/composables/use-content-navigation +1 -0
- package/dist/runtime/app/composables/use-content-navigation.d.ts +40 -0
- package/dist/runtime/app/composables/use-content-navigation.js +102 -0
- package/dist/runtime/app/composables/use-content-page +1 -0
- package/dist/runtime/app/composables/use-content-page.d.ts +47 -0
- package/dist/runtime/app/composables/use-content-page.js +142 -0
- package/dist/runtime/app/composables/use-content-shared +1 -0
- package/dist/runtime/app/composables/use-content-shared.d.ts +13 -0
- package/dist/runtime/app/composables/use-content-shared.js +29 -0
- package/dist/runtime/app/composables/use-content.d.ts +11 -186
- package/dist/runtime/app/composables/use-content.js +4 -307
- package/dist/runtime/app/plugins/hot-reload +1 -0
- package/dist/runtime/app/plugins/hot-reload.js +6 -0
- package/dist/runtime/query/backlinks +1 -0
- package/dist/runtime/query/backlinks.d.ts +8 -0
- package/dist/runtime/query/backlinks.js +90 -0
- package/dist/runtime/query/context +1 -0
- package/dist/runtime/query/context.d.ts +20 -0
- package/dist/runtime/query/context.js +0 -0
- package/dist/runtime/query/documents +1 -0
- package/dist/runtime/query/documents.d.ts +6 -0
- package/dist/runtime/query/documents.js +98 -0
- package/dist/runtime/query/errors +1 -0
- package/dist/runtime/query/errors.d.ts +1 -0
- package/dist/runtime/query/errors.js +4 -0
- package/dist/runtime/query/handles +1 -0
- package/dist/runtime/query/handles.d.ts +2 -0
- package/dist/runtime/query/handles.js +7 -0
- package/dist/runtime/query/locale-options +1 -0
- package/dist/runtime/query/locale-options.d.ts +5 -0
- package/dist/runtime/query/locale-options.js +14 -0
- package/dist/runtime/query/localized-docs +1 -0
- package/dist/runtime/query/localized-docs.d.ts +17 -0
- package/dist/runtime/query/localized-docs.js +44 -0
- package/dist/runtime/query/navigation +1 -0
- package/dist/runtime/query/navigation.d.ts +22 -0
- package/dist/runtime/query/navigation.js +73 -0
- package/dist/runtime/query/pagination +1 -0
- package/dist/runtime/query/pagination.d.ts +7 -0
- package/dist/runtime/query/pagination.js +78 -0
- package/dist/runtime/query/populate +1 -0
- package/dist/runtime/query/populate.d.ts +9 -0
- package/dist/runtime/query/populate.js +106 -0
- package/dist/runtime/query/responses +1 -0
- package/dist/runtime/query/responses.d.ts +10 -0
- package/dist/runtime/query/responses.js +47 -0
- package/dist/runtime/query/unified.d.ts +4 -19
- package/dist/runtime/query/unified.js +14 -457
- package/dist/runtime/query/variants +1 -0
- package/dist/runtime/query/variants.d.ts +11 -0
- package/dist/runtime/query/variants.js +36 -0
- package/dist/runtime/server/agent-http +1 -0
- package/dist/runtime/server/agent-http.d.ts +7 -0
- package/dist/runtime/server/agent-http.js +36 -0
- package/dist/runtime/server/agent-markdown +1 -0
- package/dist/runtime/server/agent-markdown.d.ts +83 -0
- package/dist/runtime/server/agent-markdown.js +449 -0
- package/dist/runtime/server/agent-site +1 -0
- package/dist/runtime/server/agent-site.d.ts +38 -0
- package/dist/runtime/server/agent-site.js +273 -0
- package/dist/runtime/server/api/agent-llms +1 -0
- package/dist/runtime/server/api/agent-llms-full +1 -0
- package/dist/runtime/server/api/agent-llms-full.d.ts +2 -0
- package/dist/runtime/server/api/agent-llms-full.js +13 -0
- package/dist/runtime/server/api/agent-llms.d.ts +2 -0
- package/dist/runtime/server/api/agent-llms.js +14 -0
- package/dist/runtime/server/api/agent-raw +1 -0
- package/dist/runtime/server/api/agent-raw.d.ts +2 -0
- package/dist/runtime/server/api/agent-raw.js +17 -0
- package/dist/runtime/server/api/locales.d.ts +2 -2
- package/dist/runtime/server/api/locales.js +4 -2
- package/dist/runtime/server/api/navigation.d.ts +1 -1
- package/dist/runtime/server/api/query.d.ts +1 -1
- package/dist/runtime/server/api/query.js +4 -1
- package/dist/runtime/server/api/revalidate.js +2 -2
- package/dist/runtime/server/api/search.d.ts +2 -1
- package/dist/runtime/server/api/search.js +6 -2
- package/dist/runtime/server/api/site-data.d.ts +1 -1
- package/dist/runtime/server/collection-helpers.js +2 -1
- package/dist/runtime/server/middleware/agent-link-headers +1 -0
- package/dist/runtime/server/middleware/agent-link-headers.d.ts +2 -0
- package/dist/runtime/server/middleware/agent-link-headers.js +42 -0
- package/dist/runtime/server/middleware/agent-markdown +1 -0
- package/dist/runtime/server/middleware/agent-markdown.d.ts +2 -0
- package/dist/runtime/server/middleware/agent-markdown.js +43 -0
- package/dist/runtime/server/pagefind.js +1 -0
- package/dist/runtime/server/plugins/sitemap.js +1 -0
- package/dist/runtime/server/provider-query.d.ts +8 -5
- package/dist/runtime/server/provider-query.js +50 -8
- package/dist/runtime/server/provider-result.d.ts +19 -2
- package/dist/runtime/server/providers/filesystem.js +4 -1
- package/dist/runtime/server/providers/index.d.ts +3 -1
- package/dist/runtime/server/providers/index.js +2 -2
- package/dist/runtime/server/query-api.js +2 -1
- package/dist/runtime/server/query-executor.d.ts +3 -2
- package/dist/runtime/server/query-executor.js +13 -5
- package/dist/runtime/server/search.d.ts +11 -0
- package/dist/runtime/server/search.js +24 -7
- package/dist/runtime/server/sitemap-provider.js +40 -1
- package/dist/runtime/server/sitemap.js +3 -2
- package/dist/runtime/shared/search.js +3 -2
- package/dist/runtime/transformers/component-resolver.js +2 -1
- package/dist/runtime/utils/content-components.d.ts +0 -5
- package/dist/storage/content.d.ts +2 -9
- package/dist/storage/references.d.ts +1 -8
- package/dist/storage/references.js +9 -4
- package/dist/testing/provider-contract.js +3 -4
- package/dist/testing/provider-fixture.d.ts +3 -1
- package/dist/testing/provider-fixture.js +28 -14
- package/dist/types/config.d.ts +104 -7
- package/dist/types/config.js +49 -2
- package/dist/types/module.d.ts +50 -8
- package/dist/types/query-parts/collections +1 -0
- package/dist/types/query-parts/collections.d.ts +15 -0
- package/dist/types/query-parts/collections.js +0 -0
- package/dist/types/query-parts/public +1 -0
- package/dist/types/query-parts/public.d.ts +202 -0
- package/dist/types/query-parts/public.js +0 -0
- package/dist/types/query-parts/results +1 -0
- package/dist/types/query-parts/results.d.ts +95 -0
- package/dist/types/query-parts/results.js +0 -0
- package/dist/types/query-parts/transport +1 -0
- package/dist/types/query-parts/transport.d.ts +103 -0
- package/dist/types/query-parts/transport.js +0 -0
- package/dist/types/query.d.ts +4 -862
- package/dist/types/query.js +4 -0
- package/dist/types/runtime.d.ts +2 -2
- package/dist/types/search.d.ts +3 -1
- package/dist/types/virtual.d.ts +54 -0
- package/dist/types.d.mts +3 -3
- package/dist/web-types.json +1 -1
- package/package.json +8 -8
- package/dist/runtime/app/composables/web-socket +0 -1
- package/dist/runtime/app/composables/web-socket.d.ts +0 -3
- package/dist/runtime/app/composables/web-socket.js +0 -65
- package/dist/runtime/app/plugins/ws +0 -1
- package/dist/runtime/app/plugins/ws.js +0 -7
- /package/dist/runtime/app/plugins/{ws.d.ts → hot-reload.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@ and server-side reads.
|
|
|
13
13
|
## Requirements
|
|
14
14
|
|
|
15
15
|
- Node.js 20 or later
|
|
16
|
-
- Nuxt 4.
|
|
16
|
+
- Nuxt 4.4.7 or later
|
|
17
|
+
- Vue 3.5 or later
|
|
17
18
|
|
|
18
19
|
## Install
|
|
19
20
|
|
|
@@ -45,7 +46,7 @@ Define a collection:
|
|
|
45
46
|
// content.config.ts
|
|
46
47
|
import { defineCollection, defineContentConfig } from '@lupinum/ginko-content/config'
|
|
47
48
|
|
|
48
|
-
export const pages = defineCollection(
|
|
49
|
+
export const pages = defineCollection({
|
|
49
50
|
type: 'page',
|
|
50
51
|
source: '**/*.md'
|
|
51
52
|
})
|
|
@@ -89,9 +90,10 @@ const { page } = await useContentPage(pages)
|
|
|
89
90
|
- file-authored pages and navigation from `content/`
|
|
90
91
|
- collection definitions as the source of truth for content shape and source
|
|
91
92
|
files
|
|
92
|
-
- Markdown,
|
|
93
|
+
- Markdown, Comark component tags, YAML, JSON, and CSV ingestion
|
|
93
94
|
- locale-aware content routing
|
|
94
|
-
- route-aware page loading with `useContentPage(
|
|
95
|
+
- route-aware page loading with `useContentPage(pages)`
|
|
96
|
+
- semantic previous/next route-page data through `useContentPage(pages, { surround })`
|
|
95
97
|
- server reads through `one`, `many`, `paginate`, `resolveOne`, `tree`, and
|
|
96
98
|
`neighbors`
|
|
97
99
|
- Vue composables for the same read model
|
|
@@ -99,6 +101,34 @@ const { page } = await useContentPage(pages)
|
|
|
99
101
|
- sitemap integration for public content routes
|
|
100
102
|
- a server-side provider contract for advanced custom sources
|
|
101
103
|
|
|
104
|
+
## I18n, Sitemap, and Prerender Ownership
|
|
105
|
+
|
|
106
|
+
For localized Nuxt apps, keep one source of truth per route type:
|
|
107
|
+
|
|
108
|
+
- Static Nuxt page paths belong in Nuxt I18n `i18n.pages`.
|
|
109
|
+
- Content page paths belong in Ginko collection routes and content files.
|
|
110
|
+
- Sitemap XML is generated by `@nuxtjs/sitemap`.
|
|
111
|
+
- Ginko registers the content sitemap source and contributes content prerender
|
|
112
|
+
routes.
|
|
113
|
+
|
|
114
|
+
Do not duplicate docs, blog, pricing, privacy, or translated locale paths in
|
|
115
|
+
`sitemap.urls` or app-owned `nitro.prerender.routes` arrays. Use
|
|
116
|
+
`@nuxtjs/sitemap >= 8.0.15` when translated static app slugs such as `/preise`
|
|
117
|
+
and `/en/pricing` need cross-locale sitemap alternates.
|
|
118
|
+
|
|
119
|
+
See the public guide: [Sitemap and prerender](../../docs/content/docs/6.i18n/4.sitemap-prerender.md).
|
|
120
|
+
|
|
121
|
+
## Integration Dependencies
|
|
122
|
+
|
|
123
|
+
| Feature | Dependency model |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| Markdown highlighting and built-in Shiki transformers | Included as runtime dependencies of `@lupinum/ginko-content`. |
|
|
126
|
+
| MiniSearch backend | Included as a runtime dependency and used by the default search backend. |
|
|
127
|
+
| Pagefind backend | Included as a runtime dependency and used when `content.search.engine` is `'pagefind'`. |
|
|
128
|
+
| Provider-owned search | No extra package. The active content provider must advertise and implement `search`. |
|
|
129
|
+
| Content i18n | Install and configure `@nuxtjs/i18n` when the app uses Nuxt locale routes. |
|
|
130
|
+
| Sitemap XML output | Install and configure `@nuxtjs/sitemap`; Ginko contributes the content sitemap source. |
|
|
131
|
+
|
|
102
132
|
## Scope
|
|
103
133
|
|
|
104
134
|
The default provider reads files from your Nuxt project. The package does not
|
package/compatibility.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Ginko Content release compatibility",
|
|
3
3
|
"releaseStack": {
|
|
4
|
-
"@lupinum/ginko-content": "0.1.
|
|
4
|
+
"@lupinum/ginko-content": "0.1.3",
|
|
5
5
|
"@lupinum/ginko-cms": "0.1.2",
|
|
6
6
|
"@lupinum/ginko-cms-convex": "0.1.1",
|
|
7
7
|
"@lupinum/ginko-cms-contract": "0.1.1"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"convex": ["1.38.0", "^1.38.0"],
|
|
14
14
|
"convex-helpers": ["^0.1.117", "0.1.117"],
|
|
15
15
|
"h3": ["1.15.11"],
|
|
16
|
-
"nuxt": ["^4.4.
|
|
16
|
+
"nuxt": ["^4.4.7", "4.4.7", ">=4.4.7"],
|
|
17
17
|
"typescript": ["~6.0.3", "^6.0.3", "6.0.3"],
|
|
18
18
|
"vite": ["^7.3.3", "7.3.3"],
|
|
19
19
|
"vitest": ["^4.1.6", ">=4.1.6"],
|