scribe-cms 0.0.8 → 0.0.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.
- package/README.md +5 -5
- package/dist/cli/index.cjs +432 -384
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +432 -384
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +642 -512
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +642 -513
- package/dist/index.js.map +1 -1
- package/dist/runtime.cjs +287 -261
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +286 -261
- package/dist/runtime.js.map +1 -1
- package/dist/src/config/resolve-config.d.ts.map +1 -1
- package/dist/src/core/builtin-fields.d.ts +8 -8
- package/dist/src/core/builtin-fields.d.ts.map +1 -1
- package/dist/src/core/types.d.ts +11 -4
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/create-project.d.ts.map +1 -1
- package/dist/src/export/build-static-raw-exports.d.ts.map +1 -1
- package/dist/src/i18n/build-url.d.ts +16 -3
- package/dist/src/i18n/build-url.d.ts.map +1 -1
- package/dist/src/i18n/resolve-document.d.ts +3 -2
- package/dist/src/i18n/resolve-document.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/loader/create-loader.d.ts.map +1 -1
- package/dist/src/redirects/build-json-redirects.d.ts +6 -0
- package/dist/src/redirects/build-json-redirects.d.ts.map +1 -0
- package/dist/src/redirects/build-redirects.d.ts +9 -7
- package/dist/src/redirects/build-redirects.d.ts.map +1 -1
- package/dist/src/redirects/load-type-redirects.d.ts +14 -0
- package/dist/src/redirects/load-type-redirects.d.ts.map +1 -0
- package/dist/src/redirects/redirect-schema.d.ts +31 -0
- package/dist/src/redirects/redirect-schema.d.ts.map +1 -0
- package/dist/src/runtime.d.ts +3 -1
- package/dist/src/runtime.d.ts.map +1 -1
- package/dist/src/sitemap/generate-sitemap.d.ts.map +1 -1
- package/dist/src/validate/validate-project.d.ts.map +1 -1
- package/dist/src/validate/validate-redirects.d.ts +4 -0
- package/dist/src/validate/validate-redirects.d.ts.map +1 -0
- package/dist/studio/server.cjs +90 -61
- package/dist/studio/server.cjs.map +1 -1
- package/dist/studio/server.js +90 -61
- package/dist/studio/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/core/slug-aliases.d.ts +0 -27
- package/dist/src/core/slug-aliases.d.ts.map +0 -1
- package/dist/src/redirects/translation-index.d.ts +0 -4
- package/dist/src/redirects/translation-index.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -59,8 +59,8 @@ export default defineConfig({
|
|
|
59
59
|
|
|
60
60
|
Content lives in `content/blog/*.mdx` and `content/authors/*.mdx`. The file
|
|
61
61
|
name is the EN slug. Frontmatter is validated against the schema; the built-in
|
|
62
|
-
fields `publishedAt`, `updatedAt`, `noindex`,
|
|
63
|
-
|
|
62
|
+
fields `publishedAt`, `updatedAt`, `noindex`, and `canonicalPath` are available
|
|
63
|
+
on every type without declaring them. Redirects live in `content/<type>/_redirects.json`.
|
|
64
64
|
|
|
65
65
|
### 2. Field markers
|
|
66
66
|
|
|
@@ -82,7 +82,7 @@ const scribe = createScribe(config);
|
|
|
82
82
|
// Lists & lookups
|
|
83
83
|
scribe.blog.list("fr"); // sorted docs for a locale
|
|
84
84
|
scribe.blog.get("my-post"); // exact slug lookup, no fallback
|
|
85
|
-
const r = scribe.blog.resolve("my-post", "fr"); //
|
|
85
|
+
const r = scribe.blog.resolve("my-post", "fr"); // cross-locale slug fix + EN fallback
|
|
86
86
|
// r = { document, actualLocale, shouldRedirectTo?, canonicalPath? }
|
|
87
87
|
|
|
88
88
|
// Routing helpers
|
|
@@ -105,7 +105,7 @@ are inferred from the config — no codegen.
|
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
107
|
scribe status # EN docs + translation coverage
|
|
108
|
-
scribe validate # schemas, relations,
|
|
108
|
+
scribe validate # schemas, relations, redirects, sqlite consistency
|
|
109
109
|
scribe translate --locale fr # translate stale/missing pages (Gemini)
|
|
110
110
|
scribe translate --preset active
|
|
111
111
|
scribe history blog my-post fr # revision timeline
|
|
@@ -127,7 +127,7 @@ The short version:
|
|
|
127
127
|
(e.g. Next.js `serverExternalPackages`, Vite `ssr.external`).
|
|
128
128
|
- Gate builds: `"build": "scribe validate && <your framework build>"`.
|
|
129
129
|
- Redirects: `buildAllContentRedirects(project)` produces
|
|
130
|
-
`{ source, destination, permanent }` rules from
|
|
130
|
+
`{ source, destination, permanent }` rules from `_redirects.json` and
|
|
131
131
|
cross-locale slugs — map them to your framework's redirect config.
|
|
132
132
|
|
|
133
133
|
**Site & examples:** [scribe.genlook.app](https://scribe.genlook.app) · [Example Next.js app](https://github.com/GenlookLabs/scribe-cms/tree/main/apps/web)
|