@lupinum/ginko-content 0.4.0-rc.1 → 0.4.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/CHANGELOG.md +75 -0
- package/LICENSE +1 -2
- package/README.md +28 -153
- package/dist/index.d.mts +74 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.mjs +822 -0
- package/package.json +33 -165
- package/dist/cli.d.mts +0 -1
- package/dist/cli.mjs +0 -939
- package/dist/cms-contract/asset-bytes.d.ts +0 -10
- package/dist/cms-contract/asset-bytes.js +0 -266
- package/dist/cms-contract/build.d.ts +0 -15
- package/dist/cms-contract/build.js +0 -432
- package/dist/cms-contract/hash.d.ts +0 -16
- package/dist/cms-contract/hash.js +0 -248
- package/dist/cms-contract/index.d.ts +0 -33
- package/dist/cms-contract/index.js +0 -62
- package/dist/cms-contract/limits.d.ts +0 -14
- package/dist/cms-contract/limits.js +0 -13
- package/dist/cms-contract/mdc.d.ts +0 -28
- package/dist/cms-contract/mdc.js +0 -54
- package/dist/cms-contract/path.d.ts +0 -10
- package/dist/cms-contract/path.js +0 -17
- package/dist/cms-contract/provider-wire.d.ts +0 -1074
- package/dist/cms-contract/provider-wire.js +0 -303
- package/dist/cms-contract/render-policy.d.ts +0 -46
- package/dist/cms-contract/render-policy.js +0 -402
- package/dist/cms-contract/schema.d.ts +0 -18
- package/dist/cms-contract/schema.js +0 -15
- package/dist/cms-contract/types.d.ts +0 -95
- package/dist/cms-contract/types.js +0 -0
- package/dist/cms-contract/validate.d.ts +0 -3
- package/dist/cms-contract/validate.js +0 -283
- package/dist/config.d.mts +0 -3
- package/dist/config.mjs +0 -3
- package/dist/core/cache-hints.d.ts +0 -11
- package/dist/core/cache-hints.js +0 -55
- package/dist/core/cache.d.ts +0 -29
- package/dist/core/cache.js +0 -0
- package/dist/core/content/collection.d.ts +0 -3
- package/dist/core/content/collection.js +0 -52
- package/dist/core/content/document.d.ts +0 -16
- package/dist/core/content/document.js +0 -2
- package/dist/core/content/graph.d.ts +0 -150
- package/dist/core/content/graph.js +0 -232
- package/dist/core/content/ignore.d.ts +0 -5
- package/dist/core/content/ignore.js +0 -10
- package/dist/core/content/locale.d.ts +0 -72
- package/dist/core/content/locale.js +0 -97
- package/dist/core/content/path.d.ts +0 -69
- package/dist/core/content/path.js +0 -190
- package/dist/core/content/slug.d.ts +0 -4
- package/dist/core/content/slug.js +0 -41
- package/dist/core/content/snapshot.d.ts +0 -35
- package/dist/core/content/snapshot.js +0 -46
- package/dist/core/content/sources.d.ts +0 -2
- package/dist/core/content/sources.js +0 -6
- package/dist/core/content/structural.d.ts +0 -6
- package/dist/core/content/structural.js +0 -1
- package/dist/core/data-source-error.d.ts +0 -5
- package/dist/core/data-source-error.js +0 -10
- package/dist/core/errors.d.ts +0 -15
- package/dist/core/errors.js +0 -14
- package/dist/core/json-value.d.ts +0 -41
- package/dist/core/json-value.js +0 -99
- package/dist/core/markdown/builtin-render-contracts.d.ts +0 -35
- package/dist/core/markdown/builtin-render-contracts.js +0 -25
- package/dist/core/markdown/html-tags.d.ts +0 -1
- package/dist/core/markdown/html-tags.js +0 -119
- package/dist/core/markdown/normalize-comark.d.ts +0 -14
- package/dist/core/markdown/normalize-comark.js +0 -67
- package/dist/core/markdown/parse-comark.d.ts +0 -7
- package/dist/core/markdown/parse-comark.js +0 -29
- package/dist/core/markdown/tree.d.ts +0 -9
- package/dist/core/markdown/tree.js +0 -47
- package/dist/core/provider-errors.d.ts +0 -10
- package/dist/core/provider-errors.js +0 -29
- package/dist/core/provider-result.d.ts +0 -11
- package/dist/core/provider-result.js +0 -7
- package/dist/core/provider-route-record.d.ts +0 -18
- package/dist/core/provider-route-record.js +0 -106
- package/dist/core/query/execute.d.ts +0 -45
- package/dist/core/query/execute.js +0 -377
- package/dist/core/query/filter.d.ts +0 -41
- package/dist/core/query/filter.js +0 -210
- package/dist/core/query/limits.d.ts +0 -10
- package/dist/core/query/limits.js +0 -27
- package/dist/core/query/lower.d.ts +0 -20
- package/dist/core/query/lower.js +0 -467
- package/dist/core/query/operators.d.ts +0 -37
- package/dist/core/query/operators.js +0 -155
- package/dist/core/query/params.d.ts +0 -12
- package/dist/core/query/params.js +0 -101
- package/dist/core/query/plan.d.ts +0 -170
- package/dist/core/query/plan.js +0 -7
- package/dist/core/references/resolve.d.ts +0 -50
- package/dist/core/references/resolve.js +0 -188
- package/dist/core/references/schema.d.ts +0 -11
- package/dist/core/references/schema.js +0 -91
- package/dist/core/result.d.ts +0 -27
- package/dist/core/result.js +0 -2
- package/dist/core/runtime-diagnostics.d.ts +0 -7
- package/dist/core/runtime-diagnostics.js +0 -9
- package/dist/core/visibility.d.ts +0 -64
- package/dist/core/visibility.js +0 -18
- package/dist/features/agent/agent-markdown.d.ts +0 -116
- package/dist/features/agent/agent-markdown.js +0 -148
- package/dist/features/agent/agent-paths.d.ts +0 -5
- package/dist/features/agent/agent-paths.js +0 -37
- package/dist/features/agent/walker.d.ts +0 -10
- package/dist/features/agent/walker.js +0 -198
- package/dist/features/collections/resolve.d.ts +0 -28
- package/dist/features/collections/resolve.js +0 -23
- package/dist/features/localization/config.d.ts +0 -26
- package/dist/features/localization/config.js +0 -30
- package/dist/features/localization/links.d.ts +0 -1
- package/dist/features/localization/links.js +0 -69
- package/dist/features/localization/locale-policy.d.ts +0 -107
- package/dist/features/localization/locale-policy.js +0 -184
- package/dist/features/localization/path.d.ts +0 -32
- package/dist/features/localization/path.js +0 -79
- package/dist/features/localization/reference-path.d.ts +0 -7
- package/dist/features/localization/reference-path.js +0 -10
- package/dist/features/localization/results.d.ts +0 -40
- package/dist/features/localization/results.js +0 -64
- package/dist/features/localization/route-projector.d.ts +0 -155
- package/dist/features/localization/route-projector.js +0 -157
- package/dist/features/localization/translated-slugs.d.ts +0 -11
- package/dist/features/localization/translated-slugs.js +0 -80
- package/dist/features/navigation/build.d.ts +0 -33
- package/dist/features/navigation/build.js +0 -122
- package/dist/features/navigation/canonical.d.ts +0 -26
- package/dist/features/navigation/canonical.js +0 -114
- package/dist/features/navigation/diagnostics.d.ts +0 -11
- package/dist/features/navigation/diagnostics.js +0 -52
- package/dist/features/navigation/query.d.ts +0 -24
- package/dist/features/navigation/query.js +0 -30
- package/dist/features/navigation/resolve.d.ts +0 -34
- package/dist/features/navigation/resolve.js +0 -101
- package/dist/features/navigation/tree.d.ts +0 -5
- package/dist/features/navigation/tree.js +0 -32
- package/dist/features/query/backlinks.d.ts +0 -8
- package/dist/features/query/backlinks.js +0 -87
- package/dist/features/query/context.d.ts +0 -30
- package/dist/features/query/context.js +0 -0
- package/dist/features/query/diagnostics.d.ts +0 -4
- package/dist/features/query/diagnostics.js +0 -22
- package/dist/features/query/documents.d.ts +0 -6
- package/dist/features/query/documents.js +0 -93
- package/dist/features/query/errors.d.ts +0 -1
- package/dist/features/query/errors.js +0 -4
- package/dist/features/query/handles.d.ts +0 -2
- package/dist/features/query/handles.js +0 -7
- package/dist/features/query/locale-options.d.ts +0 -5
- package/dist/features/query/locale-options.js +0 -15
- package/dist/features/query/localized-docs.d.ts +0 -6
- package/dist/features/query/localized-docs.js +0 -14
- package/dist/features/query/navigation.d.ts +0 -31
- package/dist/features/query/navigation.js +0 -77
- package/dist/features/query/pagination.d.ts +0 -13
- package/dist/features/query/pagination.js +0 -132
- package/dist/features/query/populate.d.ts +0 -10
- package/dist/features/query/populate.js +0 -161
- package/dist/features/query/query-plan-boundary.d.ts +0 -9
- package/dist/features/query/query-plan-boundary.js +0 -137
- package/dist/features/query/responses.d.ts +0 -42
- package/dist/features/query/responses.js +0 -48
- package/dist/features/query/routes.d.ts +0 -26
- package/dist/features/query/routes.js +0 -39
- package/dist/features/query/unified.d.ts +0 -69
- package/dist/features/query/unified.js +0 -28
- package/dist/features/search/navigation.d.ts +0 -6
- package/dist/features/search/navigation.js +0 -20
- package/dist/features/search/options.d.ts +0 -4
- package/dist/features/search/options.js +0 -30
- package/dist/features/search/records.d.ts +0 -9
- package/dist/features/search/records.js +0 -18
- package/dist/features/search/sections.d.ts +0 -21
- package/dist/features/search/sections.js +0 -94
- package/dist/features/search/snippet.d.ts +0 -6
- package/dist/features/search/snippet.js +0 -52
- package/dist/features/sitemap/counts.d.ts +0 -29
- package/dist/features/sitemap/counts.js +0 -50
- package/dist/features/sitemap/metadata.d.ts +0 -16
- package/dist/features/sitemap/metadata.js +0 -47
- package/dist/features/sitemap/query.d.ts +0 -29
- package/dist/features/sitemap/query.js +0 -34
- package/dist/features/validation/links.d.ts +0 -16
- package/dist/features/validation/links.js +0 -171
- package/dist/features/validation/report.d.ts +0 -14
- package/dist/features/validation/report.js +0 -10
- package/dist/integrations/nitro/build.d.ts +0 -40
- package/dist/integrations/nitro/build.js +0 -216
- package/dist/integrations/nitro/context.d.ts +0 -59
- package/dist/integrations/nitro/context.js +0 -28
- package/dist/integrations/nitro/ingest.d.ts +0 -18
- package/dist/integrations/nitro/ingest.js +0 -125
- package/dist/integrations/nitro/preview.d.ts +0 -5
- package/dist/integrations/nitro/preview.js +0 -38
- package/dist/integrations/nitro/runtime-config.d.ts +0 -1
- package/dist/integrations/nitro/runtime-config.js +0 -4
- package/dist/integrations/nitro/storage.d.ts +0 -10
- package/dist/integrations/nitro/storage.js +0 -102
- package/dist/integrations/vue/content-components.d.ts +0 -24
- package/dist/integrations/vue/content-components.js +0 -67
- package/dist/module.d.mts +0 -1116
- package/dist/module.json +0 -12
- package/dist/module.mjs +0 -2150
- package/dist/parsers/csv.d.ts +0 -2
- package/dist/parsers/csv.js +0 -40
- package/dist/parsers/from-csv.d.ts +0 -20
- package/dist/parsers/from-csv.js +0 -85
- package/dist/parsers/index.d.ts +0 -7
- package/dist/parsers/index.js +0 -50
- package/dist/parsers/json.d.ts +0 -2
- package/dist/parsers/json.js +0 -31
- package/dist/parsers/markdown-plugin-options.d.ts +0 -1
- package/dist/parsers/markdown-plugin-options.js +0 -8
- package/dist/parsers/markdown-plugins.d.ts +0 -5
- package/dist/parsers/markdown-plugins.js +0 -91
- package/dist/parsers/markdown.d.ts +0 -6
- package/dist/parsers/markdown.js +0 -83
- package/dist/parsers/path-meta.d.ts +0 -4
- package/dist/parsers/path-meta.js +0 -49
- package/dist/parsers/reserved.d.ts +0 -14
- package/dist/parsers/reserved.js +0 -35
- package/dist/parsers/utils.d.ts +0 -2
- package/dist/parsers/utils.js +0 -3
- package/dist/parsers/yaml.d.ts +0 -2
- package/dist/parsers/yaml.js +0 -36
- package/dist/portability/assets.d.ts +0 -17
- package/dist/portability/assets.js +0 -205
- package/dist/portability/documents.d.ts +0 -6
- package/dist/portability/documents.js +0 -307
- package/dist/portability/errors.d.ts +0 -26
- package/dist/portability/errors.js +0 -22
- package/dist/portability/index.d.ts +0 -13
- package/dist/portability/index.js +0 -32
- package/dist/portability/json.d.ts +0 -2
- package/dist/portability/json.js +0 -102
- package/dist/portability/manifest.d.ts +0 -16
- package/dist/portability/manifest.js +0 -72
- package/dist/portability/mdc.d.ts +0 -31
- package/dist/portability/mdc.js +0 -53
- package/dist/portability/model.d.ts +0 -70
- package/dist/portability/model.js +0 -0
- package/dist/portability/references.d.ts +0 -4
- package/dist/portability/references.js +0 -61
- package/dist/portability/segments.d.ts +0 -2
- package/dist/portability/segments.js +0 -45
- package/dist/portability/semantic-equality.d.ts +0 -3
- package/dist/portability/semantic-equality.js +0 -12
- package/dist/portability/yaml.d.ts +0 -3
- package/dist/portability/yaml.js +0 -53
- package/dist/portability-node/index.d.ts +0 -3
- package/dist/portability-node/index.js +0 -9
- package/dist/portability-node/read-directory.d.ts +0 -23
- package/dist/portability-node/read-directory.js +0 -320
- package/dist/portability-node/safe-path.d.ts +0 -3
- package/dist/portability-node/safe-path.js +0 -29
- package/dist/portability-node/streams.d.ts +0 -2
- package/dist/portability-node/streams.js +0 -26
- package/dist/portability-node/write-directory.d.ts +0 -11
- package/dist/portability-node/write-directory.js +0 -92
- package/dist/public/agent-paths.d.ts +0 -2
- package/dist/public/agent-paths.js +0 -5
- package/dist/public/agent-registry.d.ts +0 -4
- package/dist/public/agent-registry.js +0 -18
- package/dist/public/agent.d.ts +0 -16
- package/dist/public/agent.js +0 -26
- package/dist/public/client.d.ts +0 -23
- package/dist/public/client.js +0 -15
- package/dist/public/data-source.d.ts +0 -105
- package/dist/public/data-source.js +0 -19
- package/dist/public/navigation.d.ts +0 -7
- package/dist/public/navigation.js +0 -8
- package/dist/public/provider-binder.d.ts +0 -7
- package/dist/public/provider-binder.js +0 -356
- package/dist/public/provider-contract.d.ts +0 -96
- package/dist/public/provider-contract.js +0 -8
- package/dist/public/provider-document.d.ts +0 -46
- package/dist/public/provider-document.js +0 -109
- package/dist/public/provider-errors.d.ts +0 -5
- package/dist/public/provider-errors.js +0 -20
- package/dist/public/provider-query.d.ts +0 -104
- package/dist/public/provider-query.js +0 -48
- package/dist/public/provider.d.ts +0 -11
- package/dist/public/provider.js +0 -5
- package/dist/public/server.d.ts +0 -16
- package/dist/public/server.js +0 -24
- package/dist/runtime/app/components/ContentRenderer.d.vue.ts +0 -53
- package/dist/runtime/app/components/ContentRenderer.vue +0 -85
- package/dist/runtime/app/components/ContentRenderer.vue.d.ts +0 -53
- package/dist/runtime/app/components/ContentRendererInline.d.vue.ts +0 -50
- package/dist/runtime/app/components/ContentRendererInline.vue +0 -90
- package/dist/runtime/app/components/ContentRendererInline.vue.d.ts +0 -50
- package/dist/runtime/app/components/Prose/ProseCode.d.vue.ts +0 -61
- package/dist/runtime/app/components/Prose/ProseCode.vue +0 -32
- package/dist/runtime/app/components/Prose/ProseCode.vue.d.ts +0 -61
- package/dist/runtime/app/components/Prose/ProseCodeInline.d.vue.ts +0 -13
- package/dist/runtime/app/components/Prose/ProseCodeInline.vue +0 -3
- package/dist/runtime/app/components/Prose/ProseCodeInline.vue.d.ts +0 -13
- package/dist/runtime/app/components/Prose/ProseImg.d.vue.ts +0 -59
- package/dist/runtime/app/components/Prose/ProseImg.vue +0 -59
- package/dist/runtime/app/components/Prose/ProseImg.vue.d.ts +0 -59
- package/dist/runtime/app/components/Prose/ProsePre.d.vue.ts +0 -79
- package/dist/runtime/app/components/Prose/ProsePre.vue +0 -42
- package/dist/runtime/app/components/Prose/ProsePre.vue.d.ts +0 -79
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.d.vue.ts +0 -68
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue +0 -127
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue.d.ts +0 -68
- package/dist/runtime/app/components/internal/MarkdownRenderer.d.ts +0 -113
- package/dist/runtime/app/components/internal/MarkdownRenderer.js +0 -210
- package/dist/runtime/app/composables/content-i18n.d.ts +0 -3
- package/dist/runtime/app/composables/content-i18n.js +0 -1
- package/dist/runtime/app/composables/locale-context.d.ts +0 -5
- package/dist/runtime/app/composables/locale-context.js +0 -9
- package/dist/runtime/app/composables/locale.d.ts +0 -8
- package/dist/runtime/app/composables/locale.js +0 -15
- package/dist/runtime/app/composables/preview.d.ts +0 -5
- package/dist/runtime/app/composables/preview.js +0 -35
- package/dist/runtime/app/composables/query-api.d.ts +0 -22
- package/dist/runtime/app/composables/query-api.js +0 -55
- package/dist/runtime/app/composables/runtime.d.ts +0 -2
- package/dist/runtime/app/composables/runtime.js +0 -7
- package/dist/runtime/app/composables/search.d.ts +0 -60
- package/dist/runtime/app/composables/search.js +0 -281
- package/dist/runtime/app/composables/site-data.d.ts +0 -12
- package/dist/runtime/app/composables/site-data.js +0 -12
- package/dist/runtime/app/composables/toc.d.ts +0 -8
- package/dist/runtime/app/composables/toc.js +0 -23
- package/dist/runtime/app/composables/use-content-page.d.ts +0 -49
- package/dist/runtime/app/composables/use-content-page.js +0 -91
- package/dist/runtime/app/composables/use-content-shared.d.ts +0 -13
- package/dist/runtime/app/composables/use-content-shared.js +0 -29
- package/dist/runtime/app/composables/useUnwrap.d.ts +0 -8
- package/dist/runtime/app/composables/useUnwrap.js +0 -35
- package/dist/runtime/app/composables/utils.d.ts +0 -23
- package/dist/runtime/app/composables/utils.js +0 -62
- package/dist/runtime/app/pagefind-client.d.ts +0 -32
- package/dist/runtime/app/pagefind-client.js +0 -100
- package/dist/runtime/app/plugins/hot-reload.d.ts +0 -6
- package/dist/runtime/app/plugins/hot-reload.js +0 -14
- package/dist/runtime/app.d.vue.ts +0 -3
- package/dist/runtime/app.vue +0 -3
- package/dist/runtime/app.vue.d.ts +0 -3
- package/dist/runtime/markdown/plugins.d.ts +0 -6
- package/dist/runtime/markdown/plugins.js +0 -11
- package/dist/runtime/pagefind-manifest.d.ts +0 -8
- package/dist/runtime/pagefind-manifest.js +0 -15
- package/dist/runtime/server/agent-http.d.ts +0 -7
- package/dist/runtime/server/agent-http.js +0 -36
- package/dist/runtime/server/agent-markdown.d.ts +0 -17
- package/dist/runtime/server/agent-markdown.js +0 -167
- package/dist/runtime/server/agent-registry.d.ts +0 -7
- package/dist/runtime/server/agent-registry.js +0 -10
- package/dist/runtime/server/agent-site.d.ts +0 -36
- package/dist/runtime/server/agent-site.js +0 -269
- package/dist/runtime/server/api/agent-llms-full.d.ts +0 -2
- package/dist/runtime/server/api/agent-llms-full.js +0 -13
- package/dist/runtime/server/api/agent-llms.d.ts +0 -2
- package/dist/runtime/server/api/agent-llms.js +0 -14
- package/dist/runtime/server/api/agent-raw.d.ts +0 -2
- package/dist/runtime/server/api/agent-raw.js +0 -17
- package/dist/runtime/server/api/cache.d.ts +0 -43
- package/dist/runtime/server/api/cache.js +0 -88
- package/dist/runtime/server/api/locales.d.ts +0 -6
- package/dist/runtime/server/api/locales.js +0 -52
- package/dist/runtime/server/api/navigation.d.ts +0 -2
- package/dist/runtime/server/api/navigation.js +0 -60
- package/dist/runtime/server/api/query.d.ts +0 -2
- package/dist/runtime/server/api/query.js +0 -39
- package/dist/runtime/server/api/revalidate.d.ts +0 -9
- package/dist/runtime/server/api/revalidate.js +0 -231
- package/dist/runtime/server/api/search-index.d.ts +0 -2
- package/dist/runtime/server/api/search-index.js +0 -20
- package/dist/runtime/server/api/search.d.ts +0 -2
- package/dist/runtime/server/api/search.js +0 -48
- package/dist/runtime/server/api/site-data.d.ts +0 -7
- package/dist/runtime/server/api/site-data.js +0 -53
- package/dist/runtime/server/api/sitemap.d.ts +0 -2
- package/dist/runtime/server/api/sitemap.js +0 -11
- package/dist/runtime/server/cache-adapter.d.ts +0 -2
- package/dist/runtime/server/cache-adapter.js +0 -11
- package/dist/runtime/server/cache-adapters.d.ts +0 -8
- package/dist/runtime/server/cache-adapters.js +0 -27
- package/dist/runtime/server/cache-hints.d.ts +0 -5
- package/dist/runtime/server/cache-hints.js +0 -17
- package/dist/runtime/server/collection-helpers.d.ts +0 -4
- package/dist/runtime/server/collection-helpers.js +0 -33
- package/dist/runtime/server/index.d.ts +0 -5
- package/dist/runtime/server/index.js +0 -12
- package/dist/runtime/server/middleware/agent-link-headers.d.ts +0 -2
- package/dist/runtime/server/middleware/agent-link-headers.js +0 -44
- package/dist/runtime/server/middleware/agent-markdown.d.ts +0 -2
- package/dist/runtime/server/middleware/agent-markdown.js +0 -43
- package/dist/runtime/server/middleware/preview.d.ts +0 -2
- package/dist/runtime/server/middleware/preview.js +0 -7
- package/dist/runtime/server/navigation-query.d.ts +0 -8
- package/dist/runtime/server/navigation-query.js +0 -137
- package/dist/runtime/server/pagefind.d.ts +0 -2
- package/dist/runtime/server/pagefind.js +0 -59
- package/dist/runtime/server/plugins/cache.d.ts +0 -2
- package/dist/runtime/server/plugins/cache.js +0 -17
- package/dist/runtime/server/plugins/sitemap.d.ts +0 -2
- package/dist/runtime/server/plugins/sitemap.js +0 -25
- package/dist/runtime/server/provider-query.d.ts +0 -39
- package/dist/runtime/server/provider-query.js +0 -423
- package/dist/runtime/server/provider-result.d.ts +0 -21
- package/dist/runtime/server/provider-result.js +0 -24
- package/dist/runtime/server/provider-route-facts.d.ts +0 -9
- package/dist/runtime/server/provider-route-facts.js +0 -205
- package/dist/runtime/server/providers/filesystem.d.ts +0 -2
- package/dist/runtime/server/providers/filesystem.js +0 -209
- package/dist/runtime/server/providers/index.d.ts +0 -23
- package/dist/runtime/server/providers/index.js +0 -189
- package/dist/runtime/server/query-api.d.ts +0 -23
- package/dist/runtime/server/query-api.js +0 -103
- package/dist/runtime/server/query-executor.d.ts +0 -4
- package/dist/runtime/server/query-executor.js +0 -125
- package/dist/runtime/server/query-http-validation.d.ts +0 -36
- package/dist/runtime/server/query-http-validation.js +0 -154
- package/dist/runtime/server/runtime-config.d.ts +0 -1
- package/dist/runtime/server/runtime-config.js +0 -1
- package/dist/runtime/server/search.d.ts +0 -22
- package/dist/runtime/server/search.js +0 -72
- package/dist/runtime/server/sitemap-provider.d.ts +0 -5
- package/dist/runtime/server/sitemap-provider.js +0 -85
- package/dist/runtime/server/storage-access.d.ts +0 -4
- package/dist/runtime/server/storage-access.js +0 -34
- package/dist/runtime/server/validation.d.ts +0 -1
- package/dist/runtime/server/validation.js +0 -7
- package/dist/runtime/shared/search.d.ts +0 -11
- package/dist/runtime/shared/search.js +0 -62
- package/dist/runtime/transformers/define.d.ts +0 -1
- package/dist/runtime/transformers/define.js +0 -1
- package/dist/runtime/utils/content-components.d.ts +0 -1
- package/dist/runtime/utils/content-components.js +0 -5
- package/dist/runtime/utils/query.d.ts +0 -5
- package/dist/runtime/utils/query.js +0 -18
- package/dist/runtime/utils/sitemap-source.d.ts +0 -2
- package/dist/runtime/utils/sitemap-source.js +0 -6
- package/dist/runtime/virtual/transformers.d.ts +0 -4
- package/dist/runtime/virtual.d.ts +0 -10
- package/dist/storage/cache.d.ts +0 -25
- package/dist/storage/cache.js +0 -22
- package/dist/storage/contents.d.ts +0 -13
- package/dist/storage/contents.js +0 -113
- package/dist/storage/driver.d.ts +0 -13
- package/dist/storage/driver.js +0 -23
- package/dist/storage/graph.d.ts +0 -28
- package/dist/storage/graph.js +0 -59
- package/dist/storage/references.d.ts +0 -6
- package/dist/storage/references.js +0 -128
- package/dist/storage/snapshot-runtime.d.ts +0 -11
- package/dist/storage/snapshot-runtime.js +0 -57
- package/dist/storage/validation.d.ts +0 -63
- package/dist/storage/validation.js +0 -388
- package/dist/testing/data-source-contract.d.ts +0 -25
- package/dist/testing/data-source-contract.js +0 -70
- package/dist/testing/portability-contract.d.ts +0 -45
- package/dist/testing/portability-contract.js +0 -150
- package/dist/testing/provider-contract.d.ts +0 -40
- package/dist/testing/provider-contract.js +0 -142
- package/dist/testing/provider-fixture.d.ts +0 -73
- package/dist/testing/provider-fixture.js +0 -524
- package/dist/types/api.d.ts +0 -81
- package/dist/types/api.js +0 -1
- package/dist/types/component-policy.d.ts +0 -16
- package/dist/types/component-policy.js +0 -0
- package/dist/types/config.d.ts +0 -402
- package/dist/types/config.js +0 -77
- package/dist/types/content.d.ts +0 -362
- package/dist/types/content.js +0 -1
- package/dist/types/fields.d.ts +0 -63
- package/dist/types/fields.js +0 -180
- package/dist/types/index.d.ts +0 -6
- package/dist/types/index.js +0 -6
- package/dist/types/module.d.ts +0 -522
- package/dist/types/module.js +0 -0
- package/dist/types/navigation.d.ts +0 -13
- package/dist/types/navigation.js +0 -28
- package/dist/types/picomatch.d.ts +0 -8
- package/dist/types/query-parts/collections.d.ts +0 -15
- package/dist/types/query-parts/collections.js +0 -0
- package/dist/types/query-parts/public.d.ts +0 -295
- package/dist/types/query-parts/public.js +0 -7
- package/dist/types/query-parts/results.d.ts +0 -83
- package/dist/types/query-parts/results.js +0 -0
- package/dist/types/query-parts/transport.d.ts +0 -74
- package/dist/types/query-parts/transport.js +0 -18
- package/dist/types/query.d.ts +0 -5
- package/dist/types/query.js +0 -5
- package/dist/types/reference.d.ts +0 -14
- package/dist/types/reference.js +0 -13
- package/dist/types/runtime.d.ts +0 -40
- package/dist/types/runtime.js +0 -1
- package/dist/types/search.d.ts +0 -67
- package/dist/types/search.js +0 -0
- package/dist/types/virtual.d.ts +0 -92
- package/dist/types.d.mts +0 -11
- package/dist/web-types.json +0 -474
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @lupinum/ginko-content
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ea2ea13`](https://github.com/lupinum-dev/ginko/commit/ea2ea133997f2011ad0d43f77a0f1dc75605923e) Thanks [@Mat4m0](https://github.com/Mat4m0)! - Add Ginko 0.4, the first release: one content system for Nuxt websites, from Markdown files in Git to a hosted platform.
|
|
8
|
+
|
|
9
|
+
Owners, staff and AI agents edit the same content. All seven packages release together under one version. It starts at 0.4 because `@lupinum/ginko-content` and `@lupinum/ginko-docs` already published an older, unrelated line up to 0.3. Until 1.0, a minor version (0.4 → 0.5) may contain breaking changes; the changelog names each one and how to update.
|
|
10
|
+
|
|
11
|
+
Requirements: Node 22.18+, 24 or 26, and Nuxt 4.6+ or Nuxt 5 (tested on its nightly until it is released). Start a site with `npm create ginko@latest my-site`; the documentation explains every step.
|
|
12
|
+
|
|
13
|
+
**Public API**
|
|
14
|
+
|
|
15
|
+
- `@lupinum/ginko`: `defineSite`, `single`, `collection`, `f`, `defineComponents`, `formatMoney`, `plainText`, `safeHref`, `startOfWeek` and the documented types. Imported, not auto-imported.
|
|
16
|
+
- `@lupinum/ginko/nuxt`: the module, the `useGinko*` composables (everything that needs a Nuxt app starts with `useGinko`), `<GinkoMarkdown>` and `<GinkoImage>`. `@lupinum/ginko/vue`: `<GinkoMarkdown>` for any Vue app. `@lupinum/ginko/search`: `loadIndex` and `search`.
|
|
17
|
+
- `@lupinum/ginko/internal` and `@lupinum/ginko/internal/search` are for Ginko's own packages and have no stability promise.
|
|
18
|
+
- The `ginko` CLI: `check [--offline]`, `release` and `export [folder]`, plus `--version`. Every command run prints one JSON line, `{ "ok": true, … }` or `{ "ok": false, "error": { code, message } }` (`--help` and `--version` print plain text), and ends with exit code 0 (ok), 1 (fix the code), 2 (usage), 3 (platform unreachable, retry) or 4 (key not allowed). CI deploys the site only when `release` prints `"deploy": true` (a superseded run exits 0 with `"deploy": false`). The CLI reads `GINKO_PLATFORM` (or `NUXT_PUBLIC_GINKO_PLATFORM`), `GINKO_KEY`, `GINKO_COMMIT` (or `GITHUB_SHA`), `GINKO_BRANCH` and `GINKO_REMOTE`; it does not read `.env` files. `ginko-i18n --json` uses the same output shape, error codes (`USAGE`, `INVALID`) and exit codes.
|
|
19
|
+
- Config names: `f.ref` (one entry) and `f.refs` (several); `visible: { mode: 'until', field, days?, deleteExpired? }`; prefill tokens `@today`, `@workWeek`, `@nextWorkWeek`; `firstDayOfWeek`, `linkCheck`, `untranslated`, `maxBytes`, `Migration.compute`, `retired` rule `{ drop: true }`. Options and defaults are typed per field, and an unknown top-level key fails the build.
|
|
20
|
+
- Markdown components: `embed`, `frame` (`none`, `card`, `border`, …), `background` (`none`, `muted`, `tint`), `appearance` (`quiet`, `tint`), `quiz-question{mode}`, `code-tree{file}`.
|
|
21
|
+
|
|
22
|
+
**Content (`@lupinum/ginko`, `@lupinum/ginko-content`)**
|
|
23
|
+
|
|
24
|
+
- One text format: Markdown (comark 0.7) everywhere, with field profiles that limit what a field may contain. Footnotes, emoji, alerts, Shiki code, task lists, route links (`$blog.my-post`), reusable snippets and heading anchors.
|
|
25
|
+
- Data files: YAML and JSON (one file, one entry) and CSV (one file, many entries), checked against the field schema; every error names the file and field, and the line for CSV rows and unreadable files. Entries with `draft: true` stay out of production builds.
|
|
26
|
+
- Query engine in the site, over the loaded bundle: `where`, `order`, `limit`, pagination with totals, field selection, `include` for references, previous/next and facet counts.
|
|
27
|
+
- References (`f.ref`, `f.refs`), navigation trees and breadcrumbs, and a URL for every entry in every language; two entries on one URL fail the build.
|
|
28
|
+
- Link check before any HTML exists: route links, anchors, snippets and redirected paths, in the build, the dev terminal, `ginko check` and the agent tools. On the platform a save, a new entry or a scheduled publish that adds a broken link is stopped, and History says why. External links are checked on request (`linkCheck.external`), at build and in `ginko check` (never in dev), with a 7-day cache.
|
|
29
|
+
- Images: WebP copies at 480, 960 and 1600 px, made at upload on the platform and at build for files. `<GinkoImage>` and Markdown images get `srcset` and `sizes`.
|
|
30
|
+
- Redirects from `redirectFrom` (301) and site rules in `redirects` (301 by default, `status` 302/307/308 per rule).
|
|
31
|
+
- SEO from the bundle, with no other module: title template, canonical, Open Graph with `og:url`, `<html lang>`, hreflang with `x-default`, sitemap with `lastmod`, images and alternates, robots.txt with `noindex` on preview hosts, JSON-LD. With `nuxt-og-image` (in every starter), every page gets a generated share card in the brand colour `seo.color`, with the site's logo and the page's image.
|
|
32
|
+
- Works with the Nuxt SEO modules (`@nuxtjs/seo` or single ones, in any order): Ginko leaves them sitemap, robots.txt and JSON-LD defaults and hands them its pages with hreflang, the site's address, name and languages, and `noindex` on preview hosts. `nuxt-ai-ready` stays off while Ginko serves `/llms.txt`. Requires `nuxt-og-image` 7.
|
|
33
|
+
- Search index built in plain JS at build time, one record per heading section, loaded lazily per language.
|
|
34
|
+
- Agent output: `/llms.txt`, `/llms-full.txt`, a `.md` twin for every entry page (collections with a `route`), and a Markdown 404 that suggests pages. The normal address always answers with HTML.
|
|
35
|
+
- Render modes: Git-only sites prerender everything; platform sites refresh changed pages after a publish; previews render with `noindex`.
|
|
36
|
+
- In dev, `nuxt dev` restarts when `ginko.config.ts` changes, and a brick that cannot reach the platform names itself and the fix.
|
|
37
|
+
- CLI `ginko`: `check` (schema, links and the share image, for every site; `--offline` without the platform) and `release` for CI, `export` for backups; `pnpm local:dev|import|pull` run only in the Ginko monorepo.
|
|
38
|
+
|
|
39
|
+
**Languages (`@lupinum/ginko-i18n`)**
|
|
40
|
+
|
|
41
|
+
- The only locale authority: routes, alternates, hreflang, messages with plurals, and formatters for dates, ranges, relative time, numbers, currency and lists, each in the site's time zone.
|
|
42
|
+
- Works on its own in any Nuxt 4.6+ or Nuxt 5 app, without the rest of Ginko.
|
|
43
|
+
|
|
44
|
+
**Components and docs (`@lupinum/ginko-components`, `@lupinum/ginko-docs`)**
|
|
45
|
+
|
|
46
|
+
- Content components with props defined as Ginko fields: callouts, tabs, code groups, steps, cards, accordion, figures, embeds (click to load), timeline, quiz and more. Each one can also be copied into an app with the shadcn-vue CLI, from a registry the docs build generates.
|
|
47
|
+
- Docs layer (`@lupinum/ginko-docs`; `npm create ginko@latest my-docs -- --preset docs` starts a site with it): navigation, section tabs, breadcrumbs, table of contents with scroll spy, previous/next, ⌘K search with heading results, blog with authors and RSS, changelog, copy page as Markdown, dark mode. A guide for switching from Nuxt Content and `@nuxtjs/i18n`. Math (KaTeX) and mermaid diagrams render and load only on pages that use them.
|
|
48
|
+
|
|
49
|
+
**Platform and Studio (hosted by Lupinum)**
|
|
50
|
+
|
|
51
|
+
The platform is a hosted service, not an npm package. A site connects to it with one setting; without it, the site reads its content from files.
|
|
52
|
+
|
|
53
|
+
- Quick tasks for the jobs owners do most ("Heute geschlossen", "Preis ändern"), phone first, with the full form behind "Alles bearbeiten".
|
|
54
|
+
- Files library: All, Recent, Unused, Missing alt text, Duplicates and folders; icon and list views; "used in" with links; replace a file and keep its references; a used file cannot be removed by mistake. Alt text set in the library is the default for every use, per language.
|
|
55
|
+
- Approvals, off by default: a task or agent key can need a yes. Reviewers see the change, approve, approve for a time, or reject with a sentence; the author sees the reason. Releases publish several changes together.
|
|
56
|
+
- History with "show changes", "back to this version" and undo; drafts and scheduled publishing; trash with restore; translation status per language; "why is this not on the website?".
|
|
57
|
+
- Team and invitations with per-task rights, sign-in with an emailed code, AI agent keys with an MCP tool catalog derived from the operations, and weekly reminder mails.
|
|
58
|
+
- Long forms group their fields under headings or in tabs (`group` on a field, `layout: 'tabs'` on a brick); phones always show headings.
|
|
59
|
+
- A rich text editor (TipTap 3) that writes Markdown, where untouched text stays byte for byte. Headings, lists, task lists, quotes, code blocks, tables, images from the library, embeds, registry components with prop forms, slash and bubble menus, Markdown shortcuts and paste, source mode, find and replace (⌘F), a drag handle and Alt+↑/↓ to move blocks, character counter, a link card for pasted URLs, uploads with progress, and a formatting bar above the phone keyboard.
|
|
60
|
+
- Delete a site, with seven days to cancel, and delete your own account. The last owner of a site must hand it over or delete it first.
|
|
61
|
+
- Studio in German, English and Spanish (beta), light and dark.
|
|
62
|
+
|
|
63
|
+
**Presets (`@lupinum/ginko-preset-gastro`, `create-ginko`)**
|
|
64
|
+
|
|
65
|
+
- Gastro: opening hours with exceptions, seasons, holidays and new hours from a date; lunch week with planning ahead and an optional PDF; menu with prices from a date; notices that expire; events; JSON-LD for Restaurant, Menu, opening hours and Event; a printable lunch sheet.
|
|
66
|
+
- `create-ginko` starts a new site, plain or with `--preset gastro|docs`. Starters install with npm, pnpm 11 and bun, carry a `typecheck` script, a page description and share cards (`nuxt-og-image` with Takumi, Nuxt 4.6.1 or later; set `NUXT_APP_SECRET` where the site runs, `.env` has one), and create-ginko warns on an unsupported Node.
|
|
67
|
+
|
|
68
|
+
**Not in 0.4**
|
|
69
|
+
|
|
70
|
+
Real-time co-editing comes next. Also not included: an agency preset, the editor UI as a shadcn-vue registry, OAuth for agent connectors, and a Google Business sync.
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`ea2ea13`](https://github.com/lupinum-dev/ginko/commit/ea2ea133997f2011ad0d43f77a0f1dc75605923e)]:
|
|
75
|
+
- @lupinum/ginko@0.4.0
|
package/LICENSE
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
4
|
-
Copyright (c) Nuxt Project
|
|
3
|
+
Copyright (c) 2025-2026 Lupinum OG
|
|
5
4
|
|
|
6
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,173 +1,48 @@
|
|
|
1
1
|
# @lupinum/ginko-content
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Files as a content source for [`@lupinum/ginko`](https://github.com/lupinum-dev/ginko/tree/main/packages/ginko).
|
|
4
|
+
At build time it reads `content/` and builds the same bundle the Ginko platform serves, so a site
|
|
5
|
+
reads files and platform content the same way, with `useGinko`. Use it for content that developers
|
|
6
|
+
maintain: docs, a blog, legal pages, a price list. It reads Markdown, YAML, JSON and CSV.
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
`content.config.ts`, then use those collection handles for route pages, lists,
|
|
7
|
-
navigation, search, i18n, and sitemap output.
|
|
8
|
-
|
|
9
|
-
Use it when you want content files to stay simple, but your Nuxt app still
|
|
10
|
-
needs explicit APIs for route resolution, typed frontmatter, localized content,
|
|
11
|
-
and server-side reads.
|
|
12
|
-
|
|
13
|
-
This README describes the `0.4.0-rc.1` release candidate. Install it from npm's
|
|
14
|
-
`next` channel; the stable line remains `0.3` until the RC is promoted.
|
|
15
|
-
|
|
16
|
-
## Requirements
|
|
17
|
-
|
|
18
|
-
- Node.js 22.18–22.x, 24.11–24.x, or 26+
|
|
19
|
-
- Nuxt 4.4.7 through Nuxt 4.x
|
|
20
|
-
- Vue 3.5.35 through Vue 3.x
|
|
21
|
-
- ESM; CommonJS `require()` is not supported
|
|
22
|
-
|
|
23
|
-
## Install
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx nuxi module add @lupinum/ginko-content@0.4.0-rc.1
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
The Nuxt CLI installs the package and registers the module in `nuxt.config.ts`.
|
|
30
|
-
If you prefer to install by hand:
|
|
8
|
+
## Use
|
|
31
9
|
|
|
32
10
|
```bash
|
|
33
|
-
|
|
11
|
+
npm install @lupinum/ginko @lupinum/ginko-content
|
|
34
12
|
```
|
|
35
13
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
modules: ['@lupinum/ginko-content'],
|
|
39
|
-
imports: {
|
|
40
|
-
autoImport: true
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Quick Start
|
|
14
|
+
`@lupinum/ginko` is a peer dependency. Images get WebP variants through `sharp`, an optional peer dependency: install it
|
|
15
|
+
(`npm install sharp`, version 0.33 to 0.35) if your site has image files. `ginko check` runs without it.
|
|
46
16
|
|
|
47
|
-
|
|
17
|
+
Give a brick `source: 'files'` and one `f.markdown` field:
|
|
48
18
|
|
|
49
19
|
```ts
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
collections: {
|
|
60
|
-
pages
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Create `content/index.md`:
|
|
66
|
-
|
|
67
|
-
```md
|
|
68
|
-
---
|
|
69
|
-
title: Welcome
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
# Welcome
|
|
73
|
-
|
|
74
|
-
This file renders at `/`.
|
|
20
|
+
// ginko.config.ts
|
|
21
|
+
docs: collection({
|
|
22
|
+
label: 'Docs',
|
|
23
|
+
source: 'files',
|
|
24
|
+
max: 500,
|
|
25
|
+
order: 'manual',
|
|
26
|
+
route: { en: '/docs/[slug]' },
|
|
27
|
+
fields: { title: f.text('Title'), slug: f.slug('Address', { from: 'title' }), body: f.markdown('Text') },
|
|
28
|
+
}),
|
|
75
29
|
```
|
|
76
30
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<!-- pages/[...slug].vue -->
|
|
81
|
-
<script setup lang="ts">
|
|
82
|
-
import { pages } from '~~/content.config'
|
|
83
|
-
|
|
84
|
-
definePageMeta({ key: route => route.path })
|
|
85
|
-
|
|
86
|
-
const { page } = await useContentPage(pages)
|
|
87
|
-
|
|
88
|
-
if (!page.value) {
|
|
89
|
-
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
|
|
90
|
-
}
|
|
91
|
-
</script>
|
|
92
|
-
|
|
93
|
-
<template>
|
|
94
|
-
<ContentRenderer v-if="page" :value="page" />
|
|
95
|
-
</template>
|
|
31
|
+
```text
|
|
32
|
+
content/docs/1.getting-started.md one entry; the number is the order
|
|
33
|
+
content/docs/1.getting-started.de.md its translation
|
|
96
34
|
```
|
|
97
35
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- file-authored pages and navigation from `content/`
|
|
101
|
-
- collection definitions as the source of truth for content shape and source
|
|
102
|
-
files
|
|
103
|
-
- Markdown, Comark component tags, YAML, JSON, and CSV ingestion
|
|
104
|
-
- locale-aware content routing
|
|
105
|
-
- route-aware page loading with `useContentPage(pages)`
|
|
106
|
-
- semantic previous/next route-page data through `useContentPage(pages, { surround })`
|
|
107
|
-
- server reads through `one`, `many`, `paginate`, `resolveOne`, `navigation`,
|
|
108
|
-
and `surround`
|
|
109
|
-
- route and search composables, plus one-shot async client query functions for other
|
|
110
|
-
reads
|
|
111
|
-
- search helpers for MiniSearch, Pagefind, and provider-owned search
|
|
112
|
-
- sitemap integration for public content routes
|
|
113
|
-
- a server-side provider contract for advanced custom sources
|
|
114
|
-
|
|
115
|
-
## I18n, Sitemap, and Prerender Ownership
|
|
116
|
-
|
|
117
|
-
For localized Nuxt apps, keep one source of truth per route type:
|
|
118
|
-
|
|
119
|
-
- Static Nuxt page paths belong in Nuxt I18n `i18n.pages`.
|
|
120
|
-
- Content page paths belong in Ginko collection routes and content files.
|
|
121
|
-
- Sitemap XML is generated by `@nuxtjs/sitemap`.
|
|
122
|
-
- Ginko registers the content sitemap source and contributes content prerender
|
|
123
|
-
routes.
|
|
124
|
-
|
|
125
|
-
Do not duplicate docs, blog, pricing, privacy, or translated locale paths in
|
|
126
|
-
`sitemap.urls` or app-owned `nitro.prerender.routes` arrays. Use
|
|
127
|
-
`@nuxtjs/sitemap >= 8.0.15 < 9` when translated static app slugs such as `/preise`
|
|
128
|
-
and `/en/pricing` need cross-locale sitemap alternates.
|
|
129
|
-
|
|
130
|
-
See the public guide:
|
|
131
|
-
[Sitemap and prerender](https://github.com/lupinum-dev/ginko-content/blob/main/docs/content/docs/4.guides/9.sitemap-and-prerender.md).
|
|
132
|
-
|
|
133
|
-
## Integration Dependencies
|
|
134
|
-
|
|
135
|
-
| Feature | Dependency model |
|
|
136
|
-
| --- | --- |
|
|
137
|
-
| Markdown highlighting and built-in Shiki transformers | Included as runtime dependencies of `@lupinum/ginko-content`. |
|
|
138
|
-
| Math Markdown | Install the optional `katex` peer and add `katex/dist/katex.min.css` to Nuxt's `css` array. |
|
|
139
|
-
| Mermaid Markdown | Install the optional `beautiful-mermaid` peer. |
|
|
140
|
-
| MiniSearch backend | Included as a runtime dependency and used by the default search backend. |
|
|
141
|
-
| Pagefind backend | Install the optional `pagefind` peer when `content.search.engine` is `'pagefind'`. |
|
|
142
|
-
| Provider-owned search | No extra package. The active content provider must advertise and implement `search`. |
|
|
143
|
-
| Content i18n | Install and configure `@nuxtjs/i18n` 10.x when the app uses Nuxt locale routes. |
|
|
144
|
-
| Sitemap XML output | Install and configure `@nuxtjs/sitemap`; Ginko contributes the content sitemap source. |
|
|
145
|
-
|
|
146
|
-
Markdown plugins are opt-in. Omitting `content.markdown.plugins` is identical
|
|
147
|
-
to `plugins: []`; add `shiki`, `math`, `mermaid`, `toc`, or `summary` only when
|
|
148
|
-
the application needs that behavior.
|
|
149
|
-
|
|
150
|
-
## Scope
|
|
151
|
-
|
|
152
|
-
The default provider reads files from your Nuxt project. The package does not
|
|
153
|
-
include a CMS UI, Studio, admin panel, or content editing workflow.
|
|
154
|
-
|
|
155
|
-
## Project links
|
|
36
|
+
The Ginko Nuxt module finds this package by itself. It serves the Markdown of a page with the page,
|
|
37
|
+
adds `<GinkoMarkdown>` and a search index. A file error fails the build and names the file.
|
|
156
38
|
|
|
157
|
-
|
|
158
|
-
- Repository: [github.com/lupinum-dev/ginko-content](https://github.com/lupinum-dev/ginko-content)
|
|
159
|
-
- Issues: [GitHub issues](https://github.com/lupinum-dev/ginko-content/issues)
|
|
160
|
-
- Contributing: [CONTRIBUTING.md](https://github.com/lupinum-dev/ginko-content/blob/main/CONTRIBUTING.md)
|
|
161
|
-
- Security: [SECURITY.md](https://github.com/lupinum-dev/ginko-content/blob/main/SECURITY.md)
|
|
39
|
+
Full guide: [Content from files](https://ginko-docs.vercel.app/en/docs/content-from-files).
|
|
162
40
|
|
|
163
|
-
##
|
|
41
|
+
## Stability
|
|
164
42
|
|
|
165
|
-
Ginko
|
|
166
|
-
|
|
167
|
-
retaining upstream-derived parser, MDC, and rendering foundations. Credits also
|
|
168
|
-
go to [Nuxt UI](https://ui.nuxt.com/) and [Comark](https://comark.dev/), the
|
|
169
|
-
successor to the previous MDC work.
|
|
43
|
+
You install this package; you do not import it. The Ginko module and `ginko check` load it. Its
|
|
44
|
+
exports are the contract between the Ginko packages and can change in any release.
|
|
170
45
|
|
|
171
46
|
## License
|
|
172
47
|
|
|
173
|
-
|
|
48
|
+
MIT © Lupinum OG
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Locale, MarkdownValue, MarkdownTree } from '@lupinum/ginko';
|
|
2
|
+
import { Schema, Bundle } from '@lupinum/ginko/internal';
|
|
3
|
+
import { SearchIndexJson } from '@lupinum/ginko/search';
|
|
4
|
+
|
|
5
|
+
interface ContentError {
|
|
6
|
+
/** Path relative to the content directory, e.g. `docs/1.einstieg.en.md`. */
|
|
7
|
+
file: string;
|
|
8
|
+
/** Field path as in validate() issues, when the error belongs to one field. */
|
|
9
|
+
path?: string;
|
|
10
|
+
message: string;
|
|
11
|
+
/** 1-based line in the file, when the error belongs to one (YAML, JSON and CSV parse errors, CSV rows). */
|
|
12
|
+
line?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One error as `ginko check` and the build print it: `content/<file>:<line> (<field>): <message>`.
|
|
16
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
17
|
+
*/
|
|
18
|
+
declare function errorLine(e: ContentError): string;
|
|
19
|
+
interface ReadOptions {
|
|
20
|
+
/** `false` leaves out entries marked `draft: true`. Default `true` (dev shows drafts). */
|
|
21
|
+
drafts?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The bundle for page state: every markdown tree replaced by `{ ref, toc }` (CONTENT.md, Phase 14).
|
|
26
|
+
* `trees` collects the trees by their ref, for the route that serves them.
|
|
27
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
28
|
+
*/
|
|
29
|
+
declare function withMarkdownRefs(bundle: Bundle, schema: Schema, trees: Map<string, MarkdownValue>): Bundle;
|
|
30
|
+
/**
|
|
31
|
+
* The bundle a site serves to everyone (`/__ginko/files/*`, page state, search): items whose visibility window
|
|
32
|
+
* ended before `now` are left out (an expired offer is not private data to publish), and the repo path
|
|
33
|
+
* `source` is dropped unless `keepSource` is set (docs pages need it for their "Edit this page" link).
|
|
34
|
+
* Items whose window is current or still to come stay: the page filters them by date in the browser.
|
|
35
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
36
|
+
*/
|
|
37
|
+
declare function publicBundle(bundle: Bundle, schema: Schema, now: Date, options?: {
|
|
38
|
+
keepSource?: boolean;
|
|
39
|
+
}): Bundle;
|
|
40
|
+
/**
|
|
41
|
+
* One bundle per locale from the files, built by the core's buildBundle, so visibility, order, URLs
|
|
42
|
+
* and fallbacks follow the same rules as platform content. Revisions are 0: files have no history.
|
|
43
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
44
|
+
*/
|
|
45
|
+
declare function buildFileBundles(options: BuildOptions): Promise<BuildResult>;
|
|
46
|
+
interface BuildOptions extends ReadOptions {
|
|
47
|
+
/** The site's `content/` folder. */
|
|
48
|
+
contentDir: string;
|
|
49
|
+
/** The site's `public/` folder. */
|
|
50
|
+
publicDir: string;
|
|
51
|
+
schema: Schema;
|
|
52
|
+
/** The time the build counts as "now" (visibility windows, `generatedAt`). Default: the current time. */
|
|
53
|
+
now?: Date;
|
|
54
|
+
/** Where the WebP variants of the site's images are written (the folder served at `/_ginko/img`). Without it, no variants are made. */
|
|
55
|
+
imageDir?: string;
|
|
56
|
+
}
|
|
57
|
+
interface BuildResult {
|
|
58
|
+
/** One bundle per locale of the schema. */
|
|
59
|
+
bundles: Partial<Record<Locale, Bundle>>;
|
|
60
|
+
/** Co-located Markdown images: served URL to absolute path. */
|
|
61
|
+
images: Map<string, string>;
|
|
62
|
+
/** Every WebP variant file name that was written to `imageDir`. */
|
|
63
|
+
imageFiles: Set<string>;
|
|
64
|
+
errors: ContentError[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The serialized search index of one locale's bundle (see searchSections). `bundle` must hold the `{ ref }`
|
|
69
|
+
* markdown values that withMarkdownRefs wrote, and `trees` the trees behind those refs.
|
|
70
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
71
|
+
*/
|
|
72
|
+
declare function searchIndex(bundle: Bundle, trees: Map<string, MarkdownTree>, schema: Schema): Promise<SearchIndexJson>;
|
|
73
|
+
|
|
74
|
+
export { buildFileBundles, errorLine, publicBundle, searchIndex, withMarkdownRefs };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Locale, MarkdownValue, MarkdownTree } from '@lupinum/ginko';
|
|
2
|
+
import { Schema, Bundle } from '@lupinum/ginko/internal';
|
|
3
|
+
import { SearchIndexJson } from '@lupinum/ginko/search';
|
|
4
|
+
|
|
5
|
+
interface ContentError {
|
|
6
|
+
/** Path relative to the content directory, e.g. `docs/1.einstieg.en.md`. */
|
|
7
|
+
file: string;
|
|
8
|
+
/** Field path as in validate() issues, when the error belongs to one field. */
|
|
9
|
+
path?: string;
|
|
10
|
+
message: string;
|
|
11
|
+
/** 1-based line in the file, when the error belongs to one (YAML, JSON and CSV parse errors, CSV rows). */
|
|
12
|
+
line?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One error as `ginko check` and the build print it: `content/<file>:<line> (<field>): <message>`.
|
|
16
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
17
|
+
*/
|
|
18
|
+
declare function errorLine(e: ContentError): string;
|
|
19
|
+
interface ReadOptions {
|
|
20
|
+
/** `false` leaves out entries marked `draft: true`. Default `true` (dev shows drafts). */
|
|
21
|
+
drafts?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The bundle for page state: every markdown tree replaced by `{ ref, toc }` (CONTENT.md, Phase 14).
|
|
26
|
+
* `trees` collects the trees by their ref, for the route that serves them.
|
|
27
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
28
|
+
*/
|
|
29
|
+
declare function withMarkdownRefs(bundle: Bundle, schema: Schema, trees: Map<string, MarkdownValue>): Bundle;
|
|
30
|
+
/**
|
|
31
|
+
* The bundle a site serves to everyone (`/__ginko/files/*`, page state, search): items whose visibility window
|
|
32
|
+
* ended before `now` are left out (an expired offer is not private data to publish), and the repo path
|
|
33
|
+
* `source` is dropped unless `keepSource` is set (docs pages need it for their "Edit this page" link).
|
|
34
|
+
* Items whose window is current or still to come stay: the page filters them by date in the browser.
|
|
35
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
36
|
+
*/
|
|
37
|
+
declare function publicBundle(bundle: Bundle, schema: Schema, now: Date, options?: {
|
|
38
|
+
keepSource?: boolean;
|
|
39
|
+
}): Bundle;
|
|
40
|
+
/**
|
|
41
|
+
* One bundle per locale from the files, built by the core's buildBundle, so visibility, order, URLs
|
|
42
|
+
* and fallbacks follow the same rules as platform content. Revisions are 0: files have no history.
|
|
43
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
44
|
+
*/
|
|
45
|
+
declare function buildFileBundles(options: BuildOptions): Promise<BuildResult>;
|
|
46
|
+
interface BuildOptions extends ReadOptions {
|
|
47
|
+
/** The site's `content/` folder. */
|
|
48
|
+
contentDir: string;
|
|
49
|
+
/** The site's `public/` folder. */
|
|
50
|
+
publicDir: string;
|
|
51
|
+
schema: Schema;
|
|
52
|
+
/** The time the build counts as "now" (visibility windows, `generatedAt`). Default: the current time. */
|
|
53
|
+
now?: Date;
|
|
54
|
+
/** Where the WebP variants of the site's images are written (the folder served at `/_ginko/img`). Without it, no variants are made. */
|
|
55
|
+
imageDir?: string;
|
|
56
|
+
}
|
|
57
|
+
interface BuildResult {
|
|
58
|
+
/** One bundle per locale of the schema. */
|
|
59
|
+
bundles: Partial<Record<Locale, Bundle>>;
|
|
60
|
+
/** Co-located Markdown images: served URL to absolute path. */
|
|
61
|
+
images: Map<string, string>;
|
|
62
|
+
/** Every WebP variant file name that was written to `imageDir`. */
|
|
63
|
+
imageFiles: Set<string>;
|
|
64
|
+
errors: ContentError[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The serialized search index of one locale's bundle (see searchSections). `bundle` must hold the `{ ref }`
|
|
69
|
+
* markdown values that withMarkdownRefs wrote, and `trees` the trees behind those refs.
|
|
70
|
+
* @internal Loaded by the Ginko module and CLI; sites do not import it.
|
|
71
|
+
*/
|
|
72
|
+
declare function searchIndex(bundle: Bundle, trees: Map<string, MarkdownTree>, schema: Schema): Promise<SearchIndexJson>;
|
|
73
|
+
|
|
74
|
+
export { buildFileBundles, errorLine, publicBundle, searchIndex, withMarkdownRefs };
|