@lupinum/ginko-content 1.0.0-beta.7 → 1.0.0-beta.9

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.
Files changed (113) hide show
  1. package/README.md +30 -3
  2. package/dist/agent/AGENTS.md +60 -0
  3. package/dist/agent/manifest.json +299 -0
  4. package/dist/agent/pages/docs/build/blog.md +129 -0
  5. package/dist/agent/pages/docs/build/documentation-site.md +129 -0
  6. package/dist/agent/pages/docs/build/multilingual-site.md +138 -0
  7. package/dist/agent/pages/docs/build/search-and-navigation.md +124 -0
  8. package/dist/agent/pages/docs/concepts/how-ginko-thinks.md +104 -0
  9. package/dist/agent/pages/docs/concepts/why-ginko.md +69 -0
  10. package/dist/agent/pages/docs/get-started/quickstart.md +155 -0
  11. package/dist/agent/pages/docs/guides/agent-readable-output.md +183 -0
  12. package/dist/agent/pages/docs/guides/data-collections-and-references.md +151 -0
  13. package/dist/agent/pages/docs/guides/data-source-adapters.md +309 -0
  14. package/dist/agent/pages/docs/guides/drafts-and-partials.md +55 -0
  15. package/dist/agent/pages/docs/guides/frontmatter-and-schemas.md +116 -0
  16. package/dist/agent/pages/docs/guides/mdc-components.md +154 -0
  17. package/dist/agent/pages/docs/guides/navigation.md +189 -0
  18. package/dist/agent/pages/docs/guides/provider-search-and-caching.md +162 -0
  19. package/dist/agent/pages/docs/guides/providers.md +151 -0
  20. package/dist/agent/pages/docs/guides/routes-links-and-redirects.md +107 -0
  21. package/dist/agent/pages/docs/guides/search-engines.md +79 -0
  22. package/dist/agent/pages/docs/guides/sitemap-and-prerender.md +86 -0
  23. package/dist/agent/pages/docs/guides/translated-slugs.md +100 -0
  24. package/dist/agent/pages/docs/migration/filesystem-to-cms.md +116 -0
  25. package/dist/agent/pages/docs/migration/from-nuxt-content-v2.md +175 -0
  26. package/dist/agent/pages/docs/migration/from-nuxt-content-v3.md +302 -0
  27. package/dist/agent/pages/docs/migration/ginko-version-upgrades.md +492 -0
  28. package/dist/agent/pages/docs/migration.md +44 -0
  29. package/dist/agent/pages/docs/reference/components.md +107 -0
  30. package/dist/agent/pages/docs/reference/composables.md +263 -0
  31. package/dist/agent/pages/docs/reference/content-config.md +287 -0
  32. package/dist/agent/pages/docs/reference/document-envelope.md +104 -0
  33. package/dist/agent/pages/docs/reference/module-options.md +363 -0
  34. package/dist/agent/pages/docs/reference/package-exports.md +52 -0
  35. package/dist/agent/pages/docs/reference/provider-contract.md +311 -0
  36. package/dist/agent/pages/docs/reference/query-api.md +315 -0
  37. package/dist/agent/pages/docs/reference/query-operators.md +96 -0
  38. package/dist/agent/pages/docs/reference/server-api.md +141 -0
  39. package/dist/agent/pages/docs/reference.md +39 -0
  40. package/dist/agent/pages/docs/resources/deployment.md +76 -0
  41. package/dist/agent/pages/docs/resources/design-principles.md +51 -0
  42. package/dist/agent/pages/docs/resources/examples.md +57 -0
  43. package/dist/agent/pages/docs/resources/support-and-stability.md +62 -0
  44. package/dist/agent/pages/docs/resources/troubleshooting.md +79 -0
  45. package/dist/cli.mjs +36 -2
  46. package/dist/cms-contract/build.d.ts +10 -3
  47. package/dist/cms-contract/build.js +116 -18
  48. package/dist/cms-contract/index.d.ts +6 -5
  49. package/dist/cms-contract/index.js +17 -3
  50. package/dist/cms-contract/mdc.d.ts +16 -0
  51. package/dist/cms-contract/mdc.js +71 -2
  52. package/dist/cms-contract/render-policy.d.ts +17 -22
  53. package/dist/cms-contract/render-policy.js +122 -14
  54. package/dist/cms-contract/types.d.ts +13 -2
  55. package/dist/cms-contract/validate.d.ts +6 -2
  56. package/dist/cms-contract/validate.js +89 -8
  57. package/dist/cms-contract-node/artifact.d.ts +3 -3
  58. package/dist/core/markdown/angle-components.d.ts +17 -0
  59. package/dist/core/markdown/angle-components.js +683 -0
  60. package/dist/core/markdown/builtin-render-contracts.d.ts +2 -0
  61. package/dist/core/markdown/builtin-render-contracts.js +18 -0
  62. package/dist/core/markdown/component-name.d.ts +2 -0
  63. package/dist/core/markdown/component-name.js +1 -0
  64. package/dist/core/markdown/normalize-comark.js +13 -0
  65. package/dist/core/markdown/parse-comark.d.ts +7 -3
  66. package/dist/core/markdown/parse-comark.js +77 -3
  67. package/dist/features/agent/agent-markdown.js +2 -0
  68. package/dist/features/agent/walker.js +3 -1
  69. package/dist/integrations/vue/content-components.js +5 -2
  70. package/dist/module.d.mts +27 -3
  71. package/dist/module.json +1 -1
  72. package/dist/module.mjs +5 -4
  73. package/dist/parsers/markdown.js +2 -2
  74. package/dist/portability/assets.d.ts +10 -6
  75. package/dist/portability/assets.js +48 -11
  76. package/dist/portability/documents.d.ts +5 -5
  77. package/dist/portability/index.d.ts +2 -2
  78. package/dist/portability/index.js +2 -0
  79. package/dist/portability/manifest.d.ts +7 -7
  80. package/dist/portability/manifest.js +2 -2
  81. package/dist/portability/mdc.d.ts +5 -5
  82. package/dist/portability/mdc.js +1 -1
  83. package/dist/portability/model.d.ts +4 -0
  84. package/dist/portability/references.d.ts +2 -2
  85. package/dist/portability-node/filesystem-export.d.ts +62 -0
  86. package/dist/portability-node/filesystem-export.js +740 -0
  87. package/dist/portability-node/index.d.ts +1 -0
  88. package/dist/portability-node/index.js +5 -0
  89. package/dist/portability-node/read-directory.d.ts +9 -9
  90. package/dist/portability-node/read-directory.js +1 -1
  91. package/dist/portability-node/write-directory.d.ts +2 -2
  92. package/dist/runtime/app/components/ContentBodyRenderer.d.vue.ts +26 -0
  93. package/dist/runtime/app/components/ContentBodyRenderer.vue +32 -0
  94. package/dist/runtime/app/components/ContentBodyRenderer.vue.d.ts +26 -0
  95. package/dist/runtime/app/components/ContentRenderer.d.vue.ts +1 -1
  96. package/dist/runtime/app/components/ContentRenderer.vue.d.ts +1 -1
  97. package/dist/runtime/app/components/ContentRendererInline.d.vue.ts +1 -1
  98. package/dist/runtime/app/components/ContentRendererInline.vue.d.ts +1 -1
  99. package/dist/runtime/app/components/body-renderer.d.ts +1 -0
  100. package/dist/runtime/app/components/body-renderer.js +1 -0
  101. package/dist/runtime/app/components/internal/ContentRendererMarkdown.d.vue.ts +1 -1
  102. package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue +8 -5
  103. package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue.d.ts +1 -1
  104. package/dist/runtime/app/components/internal/MarkdownRenderer.d.ts +7 -4
  105. package/dist/runtime/app/components/internal/MarkdownRenderer.js +47 -19
  106. package/dist/runtime/app/utils/runtime-render-policy.d.ts +2 -0
  107. package/dist/runtime/app/utils/runtime-render-policy.js +46 -0
  108. package/dist/testing/portability-contract.d.ts +8 -8
  109. package/dist/types/component-policy.d.ts +24 -0
  110. package/dist/types/component-policy.js +7 -0
  111. package/dist/types/module.d.ts +4 -4
  112. package/dist/web-types.json +96 -97
  113. package/package.json +11 -4
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  </p>
16
16
 
17
17
  > [!WARNING]
18
- > Version `1.0.0-beta.7` is a prerelease. Install it from npm's `next`
18
+ > Version `1.0.0-beta.9` is a prerelease. Install it from npm's `next`
19
19
  > channel. The stable `0.3` line remains on `latest`.
20
20
 
21
21
  ## Why use this package?
@@ -40,13 +40,13 @@ output.
40
40
  Use the Nuxt CLI:
41
41
 
42
42
  ```bash
43
- npx nuxi module add @lupinum/ginko-content@1.0.0-beta.7
43
+ npx nuxi module add @lupinum/ginko-content@1.0.0-beta.9
44
44
  ```
45
45
 
46
46
  Or install and register the module by hand:
47
47
 
48
48
  ```bash
49
- pnpm add @lupinum/ginko-content@1.0.0-beta.7
49
+ pnpm add @lupinum/ginko-content@1.0.0-beta.9
50
50
  ```
51
51
 
52
52
  ```ts
@@ -56,6 +56,33 @@ export default defineNuxtConfig({
56
56
  })
57
57
  ```
58
58
 
59
+ <!-- BEGIN:consumer-onboarding -->
60
+
61
+ ### Use a coding agent
62
+
63
+ A coding agent is a development tool that can inspect and change your project.
64
+
65
+ After installation, copy this prompt into your agent:
66
+
67
+ ```text
68
+ Add Ginko Content to this Nuxt application and render a Markdown page.
69
+ Read the project's existing instructions first. Resolve
70
+ @lupinum/ginko-content/agent-docs from this application's directory and read
71
+ its starting pages. Use the installed version's examples and public types.
72
+ Preserve existing routes, conventions, and AGENTS.md instructions. Add or
73
+ update one short Ginko Content pointer in AGENTS.md if the project allows it;
74
+ do not duplicate the documentation. If the file is absent, create only that
75
+ pointer. Report missing guidance. Verify the page, links, and a missing route.
76
+ ```
77
+
78
+ If the installed package has no `agent-docs` export, read its packaged README
79
+ and types. Use documentation from the matching source tag when more detail is
80
+ needed. Installing or updating the package does not edit project instructions.
81
+ The pointer resolves the installed package, so upgrades and rollbacks select
82
+ the matching documentation without copying it into your application.
83
+
84
+ <!-- END:consumer-onboarding -->
85
+
59
86
  ## Quick start
60
87
 
61
88
  Define a collection:
@@ -0,0 +1,60 @@
1
+ # @lupinum/ginko-content
2
+
3
+ Documentation for installed version 1.0.0-beta.9.
4
+
5
+ Read the relevant local pages before changing this package’s integration.
6
+ Project instructions govern architecture, style and permissions.
7
+
8
+ ## Start here
9
+
10
+ - [Quickstart](./pages/docs/get-started/quickstart.md) — /docs/get-started/quickstart
11
+ - [Package exports](./pages/docs/reference/package-exports.md) — /docs/reference/package-exports
12
+
13
+ ## Find a page
14
+
15
+ The index below maps public documentation routes to this installed snapshot.
16
+ For links to this documentation site, use the matching local page in manifest.json
17
+ instead of fetching a possibly different website version. Preserve URL fragments.
18
+ External dependencies have their own versioned contracts. Report missing guidance.
19
+
20
+ - [Build a blog](./pages/docs/build/blog.md) — /docs/build/blog
21
+ - [Build a documentation site](./pages/docs/build/documentation-site.md) — /docs/build/documentation-site
22
+ - [Build a multilingual site](./pages/docs/build/multilingual-site.md) — /docs/build/multilingual-site
23
+ - [Add search and navigation](./pages/docs/build/search-and-navigation.md) — /docs/build/search-and-navigation
24
+ - [How Ginko thinks](./pages/docs/concepts/how-ginko-thinks.md) — /docs/concepts/how-ginko-thinks
25
+ - [Why Ginko (and when not)](./pages/docs/concepts/why-ginko.md) — /docs/concepts/why-ginko
26
+ - [Quickstart](./pages/docs/get-started/quickstart.md) — /docs/get-started/quickstart
27
+ - [Publish agent-readable content](./pages/docs/guides/agent-readable-output.md) — /docs/guides/agent-readable-output
28
+ - [Model data collections and references](./pages/docs/guides/data-collections-and-references.md) — /docs/guides/data-collections-and-references
29
+ - [Data-source adapters](./pages/docs/guides/data-source-adapters.md) — /docs/guides/data-source-adapters
30
+ - [Hide drafts and partials](./pages/docs/guides/drafts-and-partials.md) — /docs/guides/drafts-and-partials
31
+ - [Add typed frontmatter](./pages/docs/guides/frontmatter-and-schemas.md) — /docs/guides/frontmatter-and-schemas
32
+ - [Use Vue components in Markdown](./pages/docs/guides/mdc-components.md) — /docs/guides/mdc-components
33
+ - [Build content navigation](./pages/docs/guides/navigation.md) — /docs/guides/navigation
34
+ - [Add provider search and caching](./pages/docs/guides/provider-search-and-caching.md) — /docs/guides/provider-search-and-caching
35
+ - [Connect an external content source](./pages/docs/guides/providers.md) — /docs/guides/providers
36
+ - [Route, link, and redirect content](./pages/docs/guides/routes-links-and-redirects.md) — /docs/guides/routes-links-and-redirects
37
+ - [Choose a search engine](./pages/docs/guides/search-engines.md) — /docs/guides/search-engines
38
+ - [Generate a sitemap and prerender pages](./pages/docs/guides/sitemap-and-prerender.md) — /docs/guides/sitemap-and-prerender
39
+ - [Translate URL slugs](./pages/docs/guides/translated-slugs.md) — /docs/guides/translated-slugs
40
+ - [Migration](./pages/docs/migration.md) — /docs/migration
41
+ - [Move filesystem content to a CMS](./pages/docs/migration/filesystem-to-cms.md) — /docs/migration/filesystem-to-cms
42
+ - [From Nuxt Content v2](./pages/docs/migration/from-nuxt-content-v2.md) — /docs/migration/from-nuxt-content-v2
43
+ - [From Nuxt Content v3](./pages/docs/migration/from-nuxt-content-v3.md) — /docs/migration/from-nuxt-content-v3
44
+ - [Ginko version upgrades](./pages/docs/migration/ginko-version-upgrades.md) — /docs/migration/ginko-version-upgrades
45
+ - [Reference](./pages/docs/reference.md) — /docs/reference
46
+ - [Components](./pages/docs/reference/components.md) — /docs/reference/components
47
+ - [Composables](./pages/docs/reference/composables.md) — /docs/reference/composables
48
+ - [content.config.ts](./pages/docs/reference/content-config.md) — /docs/reference/content-config
49
+ - [Document envelope](./pages/docs/reference/document-envelope.md) — /docs/reference/document-envelope
50
+ - [Module options](./pages/docs/reference/module-options.md) — /docs/reference/module-options
51
+ - [Package exports](./pages/docs/reference/package-exports.md) — /docs/reference/package-exports
52
+ - [Provider contract](./pages/docs/reference/provider-contract.md) — /docs/reference/provider-contract
53
+ - [Query API](./pages/docs/reference/query-api.md) — /docs/reference/query-api
54
+ - [Query operators](./pages/docs/reference/query-operators.md) — /docs/reference/query-operators
55
+ - [Server API](./pages/docs/reference/server-api.md) — /docs/reference/server-api
56
+ - [Deployment](./pages/docs/resources/deployment.md) — /docs/resources/deployment
57
+ - [Design principles](./pages/docs/resources/design-principles.md) — /docs/resources/design-principles
58
+ - [Examples](./pages/docs/resources/examples.md) — /docs/resources/examples
59
+ - [Support and stability](./pages/docs/resources/support-and-stability.md) — /docs/resources/support-and-stability
60
+ - [Troubleshooting](./pages/docs/resources/troubleshooting.md) — /docs/resources/troubleshooting
@@ -0,0 +1,299 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "@lupinum/ginko-content",
4
+ "version": "1.0.0-beta.9",
5
+ "entrySha256": "7cc59f759b37eb49e601dd12251591dfe6b5ed64e61a02e0f45e6f7dc89b5b3d",
6
+ "startRoutes": [
7
+ "/docs/get-started/quickstart",
8
+ "/docs/reference/package-exports"
9
+ ],
10
+ "pages": [
11
+ {
12
+ "title": "Build a blog",
13
+ "route": "/docs/build/blog",
14
+ "url": "https://ginko-content.lupinum.com/docs/build/blog",
15
+ "file": "pages/docs/build/blog.md",
16
+ "sha256": "50e0a348cf86475ed3ebfbcebd3ce4b2d85a2fe2390165c323b8d89a753d89d3"
17
+ },
18
+ {
19
+ "title": "Build a documentation site",
20
+ "route": "/docs/build/documentation-site",
21
+ "url": "https://ginko-content.lupinum.com/docs/build/documentation-site",
22
+ "file": "pages/docs/build/documentation-site.md",
23
+ "sha256": "939fdf188eed81d525c35a87af8df22e36fb8b4009e550109d1a9be3c3ff5b90"
24
+ },
25
+ {
26
+ "title": "Build a multilingual site",
27
+ "route": "/docs/build/multilingual-site",
28
+ "url": "https://ginko-content.lupinum.com/docs/build/multilingual-site",
29
+ "file": "pages/docs/build/multilingual-site.md",
30
+ "sha256": "355c43f3400fa91602157fe00f681ecb42d4c69a85cbb5f1e4a010e53ae54ab7"
31
+ },
32
+ {
33
+ "title": "Add search and navigation",
34
+ "route": "/docs/build/search-and-navigation",
35
+ "url": "https://ginko-content.lupinum.com/docs/build/search-and-navigation",
36
+ "file": "pages/docs/build/search-and-navigation.md",
37
+ "sha256": "4ef7eadb2a83988d2e8bda17b1f6a0b93e9bf0893ec156c03644de7fb0b260b0"
38
+ },
39
+ {
40
+ "title": "How Ginko thinks",
41
+ "route": "/docs/concepts/how-ginko-thinks",
42
+ "url": "https://ginko-content.lupinum.com/docs/concepts/how-ginko-thinks",
43
+ "file": "pages/docs/concepts/how-ginko-thinks.md",
44
+ "sha256": "65681a11930aed14c28075d8274956d54d966eac34b9d24853852e975b89fffa"
45
+ },
46
+ {
47
+ "title": "Why Ginko (and when not)",
48
+ "route": "/docs/concepts/why-ginko",
49
+ "url": "https://ginko-content.lupinum.com/docs/concepts/why-ginko",
50
+ "file": "pages/docs/concepts/why-ginko.md",
51
+ "sha256": "d59797eb52b9a629f86c15b136a69cafa4c558073e4c4f2fd1b876ec79da39c1"
52
+ },
53
+ {
54
+ "title": "Quickstart",
55
+ "route": "/docs/get-started/quickstart",
56
+ "url": "https://ginko-content.lupinum.com/docs/get-started/quickstart",
57
+ "file": "pages/docs/get-started/quickstart.md",
58
+ "sha256": "096dc1cf66802cab9866f5655adcf916c29e2458a59bf3dff105067afa994150"
59
+ },
60
+ {
61
+ "title": "Publish agent-readable content",
62
+ "route": "/docs/guides/agent-readable-output",
63
+ "url": "https://ginko-content.lupinum.com/docs/guides/agent-readable-output",
64
+ "file": "pages/docs/guides/agent-readable-output.md",
65
+ "sha256": "9ea42aea957f1a460f0e669a0892423931779ca8278634845c2aea186893b3fe"
66
+ },
67
+ {
68
+ "title": "Model data collections and references",
69
+ "route": "/docs/guides/data-collections-and-references",
70
+ "url": "https://ginko-content.lupinum.com/docs/guides/data-collections-and-references",
71
+ "file": "pages/docs/guides/data-collections-and-references.md",
72
+ "sha256": "77a08618193ef2ff28c2fdb585cb87250fa5b65aa7553a43ccdb02c9ccec7bee"
73
+ },
74
+ {
75
+ "title": "Data-source adapters",
76
+ "route": "/docs/guides/data-source-adapters",
77
+ "url": "https://ginko-content.lupinum.com/docs/guides/data-source-adapters",
78
+ "file": "pages/docs/guides/data-source-adapters.md",
79
+ "sha256": "21dcd71b3e84435d1d45f51b96f2016c390e0ee69f8d06371a76457c1c0b4061"
80
+ },
81
+ {
82
+ "title": "Hide drafts and partials",
83
+ "route": "/docs/guides/drafts-and-partials",
84
+ "url": "https://ginko-content.lupinum.com/docs/guides/drafts-and-partials",
85
+ "file": "pages/docs/guides/drafts-and-partials.md",
86
+ "sha256": "54dbf62ada25b13d1c08ddc439e8e261f51f8484a2bd4efa061160d0b0f71ce2"
87
+ },
88
+ {
89
+ "title": "Add typed frontmatter",
90
+ "route": "/docs/guides/frontmatter-and-schemas",
91
+ "url": "https://ginko-content.lupinum.com/docs/guides/frontmatter-and-schemas",
92
+ "file": "pages/docs/guides/frontmatter-and-schemas.md",
93
+ "sha256": "d2239de28370cd9f268a4f9551142c99635c178ce328cde98091294c13b28570"
94
+ },
95
+ {
96
+ "title": "Use Vue components in Markdown",
97
+ "route": "/docs/guides/mdc-components",
98
+ "url": "https://ginko-content.lupinum.com/docs/guides/mdc-components",
99
+ "file": "pages/docs/guides/mdc-components.md",
100
+ "sha256": "13d6453a0fbf4dcbe99f60a626184a2b804ea711001070771a4106689ff46e97"
101
+ },
102
+ {
103
+ "title": "Build content navigation",
104
+ "route": "/docs/guides/navigation",
105
+ "url": "https://ginko-content.lupinum.com/docs/guides/navigation",
106
+ "file": "pages/docs/guides/navigation.md",
107
+ "sha256": "0cb01c4744c0566e1864d0dbb580717829b4df390bde5a76862eae633b2d10e3"
108
+ },
109
+ {
110
+ "title": "Add provider search and caching",
111
+ "route": "/docs/guides/provider-search-and-caching",
112
+ "url": "https://ginko-content.lupinum.com/docs/guides/provider-search-and-caching",
113
+ "file": "pages/docs/guides/provider-search-and-caching.md",
114
+ "sha256": "41aa21af47c57c32b9ebe0770fdcb90ecc8b26e584c9a968fb1377e575f78a98"
115
+ },
116
+ {
117
+ "title": "Connect an external content source",
118
+ "route": "/docs/guides/providers",
119
+ "url": "https://ginko-content.lupinum.com/docs/guides/providers",
120
+ "file": "pages/docs/guides/providers.md",
121
+ "sha256": "2ff9e60b33a008a193efd16c162fc35825366b80f75d0c689018f84aab2b0df9"
122
+ },
123
+ {
124
+ "title": "Route, link, and redirect content",
125
+ "route": "/docs/guides/routes-links-and-redirects",
126
+ "url": "https://ginko-content.lupinum.com/docs/guides/routes-links-and-redirects",
127
+ "file": "pages/docs/guides/routes-links-and-redirects.md",
128
+ "sha256": "191bec49db54d2617db6931a9a59f89e39d77a5eda3993d9819576c15f25eae3"
129
+ },
130
+ {
131
+ "title": "Choose a search engine",
132
+ "route": "/docs/guides/search-engines",
133
+ "url": "https://ginko-content.lupinum.com/docs/guides/search-engines",
134
+ "file": "pages/docs/guides/search-engines.md",
135
+ "sha256": "ecfea550109285a399fddc58f70b9484a71b28751076284474eb4f70f0cad32b"
136
+ },
137
+ {
138
+ "title": "Generate a sitemap and prerender pages",
139
+ "route": "/docs/guides/sitemap-and-prerender",
140
+ "url": "https://ginko-content.lupinum.com/docs/guides/sitemap-and-prerender",
141
+ "file": "pages/docs/guides/sitemap-and-prerender.md",
142
+ "sha256": "9a2f1426693fd21deeec06bf18d1f24e72cb6800686d8a218e4c2def1a678875"
143
+ },
144
+ {
145
+ "title": "Translate URL slugs",
146
+ "route": "/docs/guides/translated-slugs",
147
+ "url": "https://ginko-content.lupinum.com/docs/guides/translated-slugs",
148
+ "file": "pages/docs/guides/translated-slugs.md",
149
+ "sha256": "c566944a71f7ec96f78b01a5ab70c1adcea89c6ac051b7665ca70544de9eb1e6"
150
+ },
151
+ {
152
+ "title": "Migration",
153
+ "route": "/docs/migration",
154
+ "url": "https://ginko-content.lupinum.com/docs/migration",
155
+ "file": "pages/docs/migration.md",
156
+ "sha256": "6b53bfd7b8f7fa34b7c067a2cb47060a7f1548b9f7e464ce4f9fe32442b72aa1"
157
+ },
158
+ {
159
+ "title": "Move filesystem content to a CMS",
160
+ "route": "/docs/migration/filesystem-to-cms",
161
+ "url": "https://ginko-content.lupinum.com/docs/migration/filesystem-to-cms",
162
+ "file": "pages/docs/migration/filesystem-to-cms.md",
163
+ "sha256": "805c6149bfcdbcafad1c75d2ef243ff7bf6f4c9a962961dd854019a0b24d9afc"
164
+ },
165
+ {
166
+ "title": "From Nuxt Content v2",
167
+ "route": "/docs/migration/from-nuxt-content-v2",
168
+ "url": "https://ginko-content.lupinum.com/docs/migration/from-nuxt-content-v2",
169
+ "file": "pages/docs/migration/from-nuxt-content-v2.md",
170
+ "sha256": "c22bb498d31986679b972574275ba54c59ed446ec6acb71f8cbb753e020e41a0"
171
+ },
172
+ {
173
+ "title": "From Nuxt Content v3",
174
+ "route": "/docs/migration/from-nuxt-content-v3",
175
+ "url": "https://ginko-content.lupinum.com/docs/migration/from-nuxt-content-v3",
176
+ "file": "pages/docs/migration/from-nuxt-content-v3.md",
177
+ "sha256": "4a026da34385d4493f909ee6a10bc154ae58de9964e6448f6207fcb459440714"
178
+ },
179
+ {
180
+ "title": "Ginko version upgrades",
181
+ "route": "/docs/migration/ginko-version-upgrades",
182
+ "url": "https://ginko-content.lupinum.com/docs/migration/ginko-version-upgrades",
183
+ "file": "pages/docs/migration/ginko-version-upgrades.md",
184
+ "sha256": "90ef769b62f71b8086b5d76ea45875395646f65d4664a5298bd0105fc80008d1"
185
+ },
186
+ {
187
+ "title": "Reference",
188
+ "route": "/docs/reference",
189
+ "url": "https://ginko-content.lupinum.com/docs/reference",
190
+ "file": "pages/docs/reference.md",
191
+ "sha256": "7ee104b2baf39b1b189419886f95a4f426cc9adffe384301df5a8dbae74b526a"
192
+ },
193
+ {
194
+ "title": "Components",
195
+ "route": "/docs/reference/components",
196
+ "url": "https://ginko-content.lupinum.com/docs/reference/components",
197
+ "file": "pages/docs/reference/components.md",
198
+ "sha256": "6b5c728c4fe9490b99baa9335459395b6d226691a28592b6039a605acb4e6a78"
199
+ },
200
+ {
201
+ "title": "Composables",
202
+ "route": "/docs/reference/composables",
203
+ "url": "https://ginko-content.lupinum.com/docs/reference/composables",
204
+ "file": "pages/docs/reference/composables.md",
205
+ "sha256": "8abd6f89dc3b4364b03797f36d6b0af89daa2348ac5eb90a12a4dd15f537aea9"
206
+ },
207
+ {
208
+ "title": "content.config.ts",
209
+ "route": "/docs/reference/content-config",
210
+ "url": "https://ginko-content.lupinum.com/docs/reference/content-config",
211
+ "file": "pages/docs/reference/content-config.md",
212
+ "sha256": "986c0be15733b79ae8f0d00eb844862e9a1446bdc2fce8c6655aa3232044aaf7"
213
+ },
214
+ {
215
+ "title": "Document envelope",
216
+ "route": "/docs/reference/document-envelope",
217
+ "url": "https://ginko-content.lupinum.com/docs/reference/document-envelope",
218
+ "file": "pages/docs/reference/document-envelope.md",
219
+ "sha256": "3c178f34b1ce92789292add1eff8572c44716f385316387c2b2295714d8a0c19"
220
+ },
221
+ {
222
+ "title": "Module options",
223
+ "route": "/docs/reference/module-options",
224
+ "url": "https://ginko-content.lupinum.com/docs/reference/module-options",
225
+ "file": "pages/docs/reference/module-options.md",
226
+ "sha256": "293559058ad8b5e696c1c66ed5e91fab9908b71b8de7a77001a3db1b08aeaaa5"
227
+ },
228
+ {
229
+ "title": "Package exports",
230
+ "route": "/docs/reference/package-exports",
231
+ "url": "https://ginko-content.lupinum.com/docs/reference/package-exports",
232
+ "file": "pages/docs/reference/package-exports.md",
233
+ "sha256": "7d3dde402416a63ebf1aa6a7007494f197be47116c16bc71fe1851af1cc609a7"
234
+ },
235
+ {
236
+ "title": "Provider contract",
237
+ "route": "/docs/reference/provider-contract",
238
+ "url": "https://ginko-content.lupinum.com/docs/reference/provider-contract",
239
+ "file": "pages/docs/reference/provider-contract.md",
240
+ "sha256": "0bed35f6c2a7cef04da2c4ac513bfe7b2a3eadb28f6556dfbda8bfe822d6dc93"
241
+ },
242
+ {
243
+ "title": "Query API",
244
+ "route": "/docs/reference/query-api",
245
+ "url": "https://ginko-content.lupinum.com/docs/reference/query-api",
246
+ "file": "pages/docs/reference/query-api.md",
247
+ "sha256": "8de1e3eae111bd83d22222f665e3fbefac7ac036ead4ead664cb8965fef1c43b"
248
+ },
249
+ {
250
+ "title": "Query operators",
251
+ "route": "/docs/reference/query-operators",
252
+ "url": "https://ginko-content.lupinum.com/docs/reference/query-operators",
253
+ "file": "pages/docs/reference/query-operators.md",
254
+ "sha256": "14c5f6ecd9a17486dbaf4c884865d6eb3798e374cd7fd3d35d5bd1e74724289d"
255
+ },
256
+ {
257
+ "title": "Server API",
258
+ "route": "/docs/reference/server-api",
259
+ "url": "https://ginko-content.lupinum.com/docs/reference/server-api",
260
+ "file": "pages/docs/reference/server-api.md",
261
+ "sha256": "c061f069f34bb4221fc536c4724460488336f2bbe4569cc454b659698f2278a2"
262
+ },
263
+ {
264
+ "title": "Deployment",
265
+ "route": "/docs/resources/deployment",
266
+ "url": "https://ginko-content.lupinum.com/docs/resources/deployment",
267
+ "file": "pages/docs/resources/deployment.md",
268
+ "sha256": "80168cb7f63d8e22b332e27f18f97ff034833914007eb35a61150635d70488f3"
269
+ },
270
+ {
271
+ "title": "Design principles",
272
+ "route": "/docs/resources/design-principles",
273
+ "url": "https://ginko-content.lupinum.com/docs/resources/design-principles",
274
+ "file": "pages/docs/resources/design-principles.md",
275
+ "sha256": "8ec69437c92107b05e2889b36d371013bd09fa530141012312a442de28daefba"
276
+ },
277
+ {
278
+ "title": "Examples",
279
+ "route": "/docs/resources/examples",
280
+ "url": "https://ginko-content.lupinum.com/docs/resources/examples",
281
+ "file": "pages/docs/resources/examples.md",
282
+ "sha256": "fc21ee3197bee8d730df3981cfcd50405464d94603bfe0a4a31035bfa3b862e3"
283
+ },
284
+ {
285
+ "title": "Support and stability",
286
+ "route": "/docs/resources/support-and-stability",
287
+ "url": "https://ginko-content.lupinum.com/docs/resources/support-and-stability",
288
+ "file": "pages/docs/resources/support-and-stability.md",
289
+ "sha256": "ccad779f657029f829c51a625db549adf70db9c50e4a0b65c6915d49ef5f1536"
290
+ },
291
+ {
292
+ "title": "Troubleshooting",
293
+ "route": "/docs/resources/troubleshooting",
294
+ "url": "https://ginko-content.lupinum.com/docs/resources/troubleshooting",
295
+ "file": "pages/docs/resources/troubleshooting.md",
296
+ "sha256": "f93a193b208e1132099a124b7bf6c1f55f897cd82e43a7b3bb0700ef404d3f6d"
297
+ }
298
+ ]
299
+ }
@@ -0,0 +1,129 @@
1
+ ---
2
+ title: "Build a blog"
3
+ description: "Create typed post routes, previous/next links, and a paginated index."
4
+ url: "https://ginko-content.lupinum.com/docs/build/blog"
5
+ route: "/docs/build/blog"
6
+ locale: "en"
7
+ section: "Documentation"
8
+ collection: "docs"
9
+ source: "ginko-content"
10
+ ---
11
+
12
+ > Create typed post routes, previous/next links, and a paginated index.
13
+
14
+ Use a page collection for post routes and a regular Nuxt page for the index. Start with the collection.
15
+
16
+ ```ts [content.config.ts]
17
+ import { defineCollection, defineContentConfig } from '@lupinum/ginko-content/config'
18
+ import { z } from 'zod'
19
+
20
+ export const posts = defineCollection({
21
+ type: 'page',
22
+ source: 'blog/**/*.md',
23
+ route: '/blog',
24
+ schema: z.object({
25
+ title: z.string(),
26
+ description: z.string(),
27
+ publishedAt: z.iso.datetime(),
28
+ tags: z.array(z.string()).default([]),
29
+ image: z.string().optional()
30
+ })
31
+ })
32
+
33
+ export default defineContentConfig({ collections: { posts } })
34
+ ```
35
+
36
+ Every file under `content/blog/` now becomes a post at `/blog/<slug>`, and its frontmatter is checked against the schema. `publishedAt` is validated as an ISO datetime, so you can sort on it reliably. `tags` defaults to an empty array when you omit it.
37
+
38
+ ## Write a post
39
+
40
+ ```md [content/blog/first-post.md]
41
+ ---
42
+ title: First post
43
+ description: Why the content model stays collection-first.
44
+ publishedAt: 2026-07-14T08:00:00.000Z
45
+ tags:
46
+ - architecture
47
+ ---
48
+
49
+ # First post
50
+
51
+ The post body is Markdown.
52
+ ```
53
+
54
+ ## Render the post
55
+
56
+ `useContentPage` loads the post for the current route. Pass `surround` to also get the neighbouring posts for previous and next links.
57
+
58
+ ```vue [app/pages/blog/[...slug\].vue]
59
+ <script setup lang="ts">
60
+ import { createError } from '#imports'
61
+ import { posts } from '~~/content.config'
62
+
63
+ definePageMeta({ key: route => route.path })
64
+
65
+ const { page: post, previous, next } = await useContentPage(posts, {
66
+ surround: { select: ['description', 'publishedAt'] }
67
+ })
68
+
69
+ if (!post.value) {
70
+ throw createError({ statusCode: 404, statusMessage: 'Post not found', fatal: true })
71
+ }
72
+ </script>
73
+
74
+ <template>
75
+ <article v-if="post">
76
+ <ContentRenderer :value="post" />
77
+
78
+ <nav aria-label="Adjacent posts">
79
+ <NuxtLink v-if="previous" :to="previous.path">
80
+ Previous: {{ previous.title }}
81
+ </NuxtLink>
82
+ <NuxtLink v-if="next" :to="next.path">
83
+ Next: {{ next.title }}
84
+ </NuxtLink>
85
+ </nav>
86
+ </article>
87
+ </template>
88
+ ```
89
+
90
+ The guards hide the previous link on the first post and the next link on the last.
91
+
92
+ ## Build a paginated index
93
+
94
+ `paginate` returns one page of results plus paging metadata. Read the page number from `route.query.page`, and pass it to `watch` so the query re-runs when the URL changes. Give `useAsyncData` a key that includes the page number, so each page caches separately.
95
+
96
+ ```vue [app/pages/blog/index.vue]
97
+ <script setup lang="ts">
98
+ import { paginate } from '@lupinum/ginko-content/client'
99
+ import { posts } from '~~/content.config'
100
+
101
+ const route = useRoute()
102
+ const pageNumber = computed(() =>
103
+ Math.max(1, Number.parseInt(String(route.query.page || 1), 10) || 1)
104
+ )
105
+
106
+ const { data: result } = await useAsyncData(
107
+ () => `blog:${pageNumber.value}`,
108
+ () => paginate(posts, {
109
+ mode: 'offset',
110
+ page: pageNumber.value,
111
+ limit: 12,
112
+ sort: { publishedAt: 'desc' },
113
+ select: ['title', 'description', 'publishedAt', 'tags', 'image']
114
+ }),
115
+ { watch: [pageNumber] }
116
+ )
117
+ </script>
118
+
119
+ <template>
120
+ <article v-for="post in result?.data" :key="post.canonicalKey">
121
+ <NuxtLink :to="post.route.resolvedPath">{{ post.title }}</NuxtLink>
122
+ <p>{{ post.description }}</p>
123
+ </article>
124
+ </template>
125
+ ```
126
+
127
+ Link each card with `post.route.resolvedPath`, and use `post.canonicalKey` as the `v-for` key. Both come back even when you narrow the fields with `select`, so the card always knows where it points.
128
+
129
+ Set `draft: true` in a post's frontmatter to keep it out of the production build while you finish it.