scribe-cms 0.0.8 → 0.0.10

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 (50) hide show
  1. package/README.md +5 -5
  2. package/dist/cli/index.cjs +433 -384
  3. package/dist/cli/index.cjs.map +1 -1
  4. package/dist/cli/index.js +433 -384
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/index.cjs +643 -512
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +643 -513
  9. package/dist/index.js.map +1 -1
  10. package/dist/runtime.cjs +287 -261
  11. package/dist/runtime.cjs.map +1 -1
  12. package/dist/runtime.js +286 -261
  13. package/dist/runtime.js.map +1 -1
  14. package/dist/src/config/resolve-config.d.ts.map +1 -1
  15. package/dist/src/core/builtin-fields.d.ts +8 -8
  16. package/dist/src/core/builtin-fields.d.ts.map +1 -1
  17. package/dist/src/core/types.d.ts +11 -4
  18. package/dist/src/core/types.d.ts.map +1 -1
  19. package/dist/src/create-project.d.ts.map +1 -1
  20. package/dist/src/export/build-static-raw-exports.d.ts.map +1 -1
  21. package/dist/src/i18n/build-url.d.ts +16 -3
  22. package/dist/src/i18n/build-url.d.ts.map +1 -1
  23. package/dist/src/i18n/resolve-document.d.ts +3 -2
  24. package/dist/src/i18n/resolve-document.d.ts.map +1 -1
  25. package/dist/src/index.d.ts +3 -2
  26. package/dist/src/index.d.ts.map +1 -1
  27. package/dist/src/loader/create-loader.d.ts.map +1 -1
  28. package/dist/src/redirects/build-json-redirects.d.ts +6 -0
  29. package/dist/src/redirects/build-json-redirects.d.ts.map +1 -0
  30. package/dist/src/redirects/build-redirects.d.ts +9 -7
  31. package/dist/src/redirects/build-redirects.d.ts.map +1 -1
  32. package/dist/src/redirects/load-type-redirects.d.ts +14 -0
  33. package/dist/src/redirects/load-type-redirects.d.ts.map +1 -0
  34. package/dist/src/redirects/redirect-schema.d.ts +31 -0
  35. package/dist/src/redirects/redirect-schema.d.ts.map +1 -0
  36. package/dist/src/runtime.d.ts +3 -1
  37. package/dist/src/runtime.d.ts.map +1 -1
  38. package/dist/src/sitemap/generate-sitemap.d.ts.map +1 -1
  39. package/dist/src/validate/validate-project.d.ts.map +1 -1
  40. package/dist/src/validate/validate-redirects.d.ts +4 -0
  41. package/dist/src/validate/validate-redirects.d.ts.map +1 -0
  42. package/dist/studio/server.cjs +90 -61
  43. package/dist/studio/server.cjs.map +1 -1
  44. package/dist/studio/server.js +90 -61
  45. package/dist/studio/server.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/src/core/slug-aliases.d.ts +0 -27
  48. package/dist/src/core/slug-aliases.d.ts.map +0 -1
  49. package/dist/src/redirects/translation-index.d.ts +0 -4
  50. 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`, `aliases`, `redirect_to`, and
63
- `canonicalPath` are available on every type without declaring them.
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"); // aliases + redirects + EN fallback
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, aliases, sqlite consistency
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 aliases, `redirect_to`, and
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)