@tenphi/cookbook 0.24.0 → 0.25.1
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/docs/configuration.md +7 -1
- package/docs/deployment.md +7 -0
- package/docs/quality-checks.md +5 -3
- package/docs/site-navigation.md +22 -2
- package/package.json +3 -3
package/docs/configuration.md
CHANGED
|
@@ -507,6 +507,10 @@ Configure renderer-level Markdown options such as custom remark or rehype
|
|
|
507
507
|
plugins and Shiki languages through Astro's top-level `markdown` configuration.
|
|
508
508
|
Cookbook preserves those settings while adding its own build-time transforms.
|
|
509
509
|
|
|
510
|
+
GFM column alignment (`:--`, `:-:`, `--:`) becomes a `data-align` modifier on
|
|
511
|
+
table cells. Restyle it with `@own(align=right)` and similar states in
|
|
512
|
+
`theme.styles.MarkdownTable.Cell`.
|
|
513
|
+
|
|
510
514
|
Cookbook preserves custom metadata and supports custom schemas. See
|
|
511
515
|
[extending Cookbook](./plugins.md) for Astro Markdown plugins, native GitHub
|
|
512
516
|
alerts, the content query API, and styling limits.
|
|
@@ -612,7 +616,9 @@ build: {
|
|
|
612
616
|
`strict` makes missing internal links errors instead of warnings. `ci` makes
|
|
613
617
|
missing heading fragments errors and defaults to `true` when `CI=true`.
|
|
614
618
|
Cookbook derives its public base path from Astro's top-level `base` setting so
|
|
615
|
-
routes and assets cannot drift between two configurations.
|
|
619
|
+
routes and assets cannot drift between two configurations. Page URLs likewise
|
|
620
|
+
follow Astro's `trailingSlash` and `build.format`; see
|
|
621
|
+
[Deployment](./deployment.md#github-pages). An empty `cacheDir`
|
|
616
622
|
uses `~/.cache/cookbook`; set an explicit path to relocate downloaded package
|
|
617
623
|
artifacts. Package limits protect builds from unexpected registry artifacts;
|
|
618
624
|
raise them deliberately for a reviewed package.
|
package/docs/deployment.md
CHANGED
|
@@ -42,6 +42,13 @@ served at `https://owner.github.io/repository/`, set Astro's
|
|
|
42
42
|
`base: "/repository/"`; Cookbook derives the same base for its graph and
|
|
43
43
|
assets.
|
|
44
44
|
|
|
45
|
+
Page URLs follow Astro's `trailingSlash` and `build.format`. The default
|
|
46
|
+
directory output writes `guide/index.html`, so links, canonicals, and `llms.txt`
|
|
47
|
+
use `/guide/`. `build.format: "file"` writes `guide.html` and uses `/guide`,
|
|
48
|
+
while the home remains the directory index at the base. `trailingSlash` set to
|
|
49
|
+
`"always"` or `"never"` overrides both. Either way, readers follow the URL the
|
|
50
|
+
host serves directly instead of a redirect.
|
|
51
|
+
|
|
45
52
|
## Custom domains
|
|
46
53
|
|
|
47
54
|
Set Cookbook's canonical site metadata to the HTTPS origin. The integration
|
package/docs/quality-checks.md
CHANGED
|
@@ -49,10 +49,12 @@ rejects the TypeScript 7 API. Runtime compilation and lint parsing are separate.
|
|
|
49
49
|
|
|
50
50
|
The reference build enforces separate limits for initial page JavaScript,
|
|
51
51
|
lazy search assets, font files, images, and extracted Tasty CSS. A default guide
|
|
52
|
-
currently loads about
|
|
52
|
+
currently loads about 22 KB of first-party JavaScript initially (about 10 KB
|
|
53
|
+
gzipped), including Astro's built-in hover prefetching; search and the client
|
|
54
|
+
router remain lazy. The initial JavaScript budget is 24 KiB.
|
|
53
55
|
The checked reference output contains about 73 KB of fonts, 66 KB of images and
|
|
54
|
-
icons, and a
|
|
55
|
-
initial JavaScript total about
|
|
56
|
+
icons, and a 181 KB shared stylesheet. The guide's first-party HTML, CSS, and
|
|
57
|
+
initial JavaScript total about 40 KB when gzipped. Actual network transfers vary
|
|
56
58
|
with hosting compression and caching. `node scripts/check-reference-budgets.mjs`
|
|
57
59
|
prints current raw budgets and the gzip estimate; neither includes external
|
|
58
60
|
analytics.
|
package/docs/site-navigation.md
CHANGED
|
@@ -33,6 +33,25 @@ scroll resets to the top on page changes, including Back and Forward; links with
|
|
|
33
33
|
fragments still navigate to their heading. The current page and its ancestors
|
|
34
34
|
update from the destination markup. Mobile navigation and other open panels close.
|
|
35
35
|
|
|
36
|
+
Cookbook enables Astro's built-in hover prefetching by default. Hovering over or
|
|
37
|
+
focusing an internal link for about 80 ms downloads the destination HTML in the
|
|
38
|
+
background. Moving across links briefly does not prefetch them, and repeated
|
|
39
|
+
links to the same page share a prefetch. When the browser reports data-saving
|
|
40
|
+
mode or a slow connection, Astro waits for tap intent instead.
|
|
41
|
+
|
|
42
|
+
Prefetching warms the browser's HTTP cache. Static hosting should send cache
|
|
43
|
+
headers such as `Cache-Control` or `ETag` so navigation can reuse the response;
|
|
44
|
+
uncacheable responses may still be downloaded again on click. Browser and private
|
|
45
|
+
session policies can also limit cache reuse. Destination stylesheets remain part
|
|
46
|
+
of the router's preparation before the page swap.
|
|
47
|
+
|
|
48
|
+
Set `prefetch: false` in `astro.config.mjs` to disable page prefetching while
|
|
49
|
+
retaining client navigation. Cookbook preserves any explicit Astro `prefetch`
|
|
50
|
+
configuration, including `prefetchAll: false` for selective prefetching. For a
|
|
51
|
+
single link, use `data-astro-prefetch="false"` to opt out or
|
|
52
|
+
`data-astro-prefetch` to opt in. See [Astro's prefetch guide](https://docs.astro.build/en/guides/prefetch/)
|
|
53
|
+
for the supported strategies.
|
|
54
|
+
|
|
36
55
|
Search keeps its query and loaded engine between pages in the same language,
|
|
37
56
|
and closes when a result is followed. Language changes initialize the translated
|
|
38
57
|
search interface. External links, downloads, modified clicks, and links marked
|
|
@@ -41,8 +60,9 @@ use normal document navigation.
|
|
|
41
60
|
|
|
42
61
|
Custom browser scripts should attach behavior through custom-element lifecycle
|
|
43
62
|
callbacks or initialize on `astro:page-load`; bundled scripts are not rerun on
|
|
44
|
-
every client navigation. The router and appearance initialization belong to the
|
|
45
|
-
and remain available with replacement Header, Head, and
|
|
63
|
+
every client navigation. The router and appearance initialization belong to the
|
|
64
|
+
common page shell and remain available with replacement Header, Head, and
|
|
65
|
+
PageFrame components.
|
|
46
66
|
|
|
47
67
|
## Search
|
|
48
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"author": "Andrey Yamanov",
|
|
69
69
|
"license": "MIT",
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@tenphi/docs": "0.
|
|
72
|
-
"@tenphi/renderer": "0.
|
|
71
|
+
"@tenphi/docs": "0.25.1",
|
|
72
|
+
"@tenphi/renderer": "0.25.1"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"astro": "^7.3.2"
|