@tenphi/cookbook 0.17.0 → 0.18.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/dist/cli.js +39 -9
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/content.d.ts +3 -0
- package/dist/content.js +3 -0
- package/dist/eslint-plugin.d.ts +2 -2
- package/dist/eslint-plugin.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/ai-agents.md +15 -4
- package/docs/authoring.mdx +42 -8
- package/docs/cli.md +43 -1
- package/docs/configuration.md +77 -15
- package/docs/content-sources.md +26 -0
- package/docs/customization-rules.md +8 -0
- package/docs/deployment.md +20 -3
- package/docs/examples.md +5 -2
- package/docs/getting-started.md +9 -6
- package/docs/index.md +21 -10
- package/docs/migration.md +98 -5
- package/docs/plugins.md +120 -0
- package/docs/publishing.md +153 -0
- package/docs/quality-checks.md +71 -0
- package/docs/recipes.md +116 -0
- package/docs/theme-and-components.md +481 -70
- package/docs/troubleshooting.md +89 -0
- package/package.json +7 -3
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Troubleshooting
|
|
3
|
+
description: Diagnose configuration, contrast, fonts, plugins, routes, and deployment failures.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Start with `cookbook doctor --json` for configuration, content graph, and local
|
|
7
|
+
asset diagnostics. Then build and run `cookbook check-build --json`. The checks
|
|
8
|
+
cover different stages; a healthy preflight does not compile MDX or fetch remote
|
|
9
|
+
fonts. See [CLI](./cli.md) for flags and diagnostic output.
|
|
10
|
+
|
|
11
|
+
## Contrast failures
|
|
12
|
+
|
|
13
|
+
Read the reported foreground/background pair, appearance mode, measured value,
|
|
14
|
+
and target. A passing light-mode color can fail in dark or high-contrast mode.
|
|
15
|
+
Keep `theme.brand: { from: "#d97706" }` simple, and let the semantic roles adapt.
|
|
16
|
+
For custom palette roles use Glaze `base`, absolute or relative `tone`, and
|
|
17
|
+
saturation factors. Body and heading colors normally use absolute tones 0 and 4.
|
|
18
|
+
|
|
19
|
+
A custom background also changes the contrast of text placed on it. Update the
|
|
20
|
+
related text declaration to name that background in `base` and set a suitable
|
|
21
|
+
`contrast` floor. A custom color name alone cannot tell Cookbook where you will
|
|
22
|
+
use it: declare its contrast relationship and review the actual component in all
|
|
23
|
+
four appearance modes. For mixed colors, consider a separate regular text role
|
|
24
|
+
whose `base` names the mixed background. See the
|
|
25
|
+
[palette reference](./theme-and-components.md#semantic-palette).
|
|
26
|
+
|
|
27
|
+
Do not lower a target just to silence a failure. Check overridden surface tones,
|
|
28
|
+
opacity, contrast adaptation settings, and whether the intended text is actually
|
|
29
|
+
using the right semantic token. Larger headings should remain close to body
|
|
30
|
+
contrast. Browser checks complement the numeric diagnostics.
|
|
31
|
+
|
|
32
|
+
## Missing or wrong fonts
|
|
33
|
+
|
|
34
|
+
- **Local file missing:** `/fonts/acme.woff2` means a file in the Astro public
|
|
35
|
+
directory. Font paths must be root-relative public URLs. Run
|
|
36
|
+
`doctor --public-dir ./static` if your Astro app uses a custom public directory.
|
|
37
|
+
- **Google request fails:** check the exact family name and supported weights and
|
|
38
|
+
styles. Explicit requests reject missing styles; shorthand warns if italics
|
|
39
|
+
are unavailable. See [font configuration](./theme-and-components.md#change-font-families).
|
|
40
|
+
- **Offline cache miss:** warm the cache with `cache: "reuse"` while online, and
|
|
41
|
+
retain `<Astro cacheDir>/cookbook-fonts`. The key includes the requested family,
|
|
42
|
+
weights, and styles. `cache: "refresh"` intentionally needs the network.
|
|
43
|
+
- **Wrong weight:** a static file cannot supply every intermediate weight. Use
|
|
44
|
+
matching files or a variable range. Check `theme.presets`: an explicit
|
|
45
|
+
`fontFamily` there takes precedence over the semantic font role.
|
|
46
|
+
- **Deployed 404:** verify Astro's `base`, the output files, and your host's asset
|
|
47
|
+
paths with `check-build --url`. Self-hosted Google fonts should be requested
|
|
48
|
+
from your site's `_cookbook/fonts/` directory.
|
|
49
|
+
|
|
50
|
+
## Incompatible plugins
|
|
51
|
+
|
|
52
|
+
Use the [tested plugin matrix](./plugins.md#verified-compatibility). Cookbook
|
|
53
|
+
owns content routing and all rendered styles. Plugins that read Astro's docs
|
|
54
|
+
collection filesystem or inject CSS are not automatically compatible.
|
|
55
|
+
`starlight-github-alerts` requires the documented unified Markdown processor;
|
|
56
|
+
`starlight-links-validator` is unsupported because it reads synthetic paths.
|
|
57
|
+
Use Cookbook's graph and built-output checks for links.
|
|
58
|
+
|
|
59
|
+
For your own plugin, read custom frontmatter through route middleware or the
|
|
60
|
+
server-only `@tenphi/cookbook/content` API. If a schema rejects data, check that
|
|
61
|
+
custom fields do not replace reserved Cookbook frontmatter and that parsed
|
|
62
|
+
values are JSON-safe. A plugin's successful registration is not proof that its
|
|
63
|
+
rendered output works.
|
|
64
|
+
|
|
65
|
+
## Missing pages or unexpected navigation
|
|
66
|
+
|
|
67
|
+
Check the source `glob`, `base`, `routeBase`, and frontmatter `slug` with
|
|
68
|
+
`doctor`. Use stable source IDs for repeated mounts and `source:<id>/<path>`
|
|
69
|
+
for ambiguous cross-source links. Public routes omit Astro's deployment `base`
|
|
70
|
+
in configuration; Cookbook adds it to rendered links.
|
|
71
|
+
|
|
72
|
+
A draft remains directly accessible in production but is unlisted. A missing
|
|
73
|
+
translation does not create a duplicate page: the language picker points to a
|
|
74
|
+
real default-language fallback, and locale navigation lists real translated
|
|
75
|
+
pages. Version roots need an existing home, including a localized home when
|
|
76
|
+
configured. See [locales and versions](./configuration.md).
|
|
77
|
+
|
|
78
|
+
## Preview indexing or deployment mismatch
|
|
79
|
+
|
|
80
|
+
Use `site.seo.index: false` for a preview build and disable page Markdown if your
|
|
81
|
+
host cannot add noindex headers to those files. This controls indexing; it does
|
|
82
|
+
not restrict access. Build separately for previews so preview metadata cannot
|
|
83
|
+
replace the public site's metadata.
|
|
84
|
+
|
|
85
|
+
Run `cookbook check-build --url https://preview.example.com/` against the exact
|
|
86
|
+
artifact you deployed. Failures can identify missing pages/assets, stale titles
|
|
87
|
+
or canonical metadata, and unexpected host noindex headers. A host returning
|
|
88
|
+
HTML for a missing asset is also a failure. Check redirects, base paths, output
|
|
89
|
+
directory, and the uploaded artifact. See the [deployment recipe](./deployment.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"import": "./dist/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./content": {
|
|
22
|
+
"types": "./dist/content.d.ts",
|
|
23
|
+
"import": "./dist/content.js"
|
|
24
|
+
},
|
|
21
25
|
"./components": {
|
|
22
26
|
"types": "./dist/components.d.ts",
|
|
23
27
|
"import": "./dist/components.js"
|
|
@@ -64,8 +68,8 @@
|
|
|
64
68
|
"author": "Andrey Yamanov",
|
|
65
69
|
"license": "MIT",
|
|
66
70
|
"dependencies": {
|
|
67
|
-
"@tenphi/docs": "0.
|
|
68
|
-
"@tenphi/starlight": "0.
|
|
71
|
+
"@tenphi/docs": "0.18.0",
|
|
72
|
+
"@tenphi/starlight": "0.18.0"
|
|
69
73
|
},
|
|
70
74
|
"peerDependencies": {
|
|
71
75
|
"astro": "^7.3.2"
|