ampless 1.0.0-beta.51 → 1.0.0-beta.52

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.
@@ -481,6 +481,15 @@ runtime は `body` を `sanitize-html` の厳格 allowlist で sanitize し(
481
481
 
482
482
  `cms.config.plugins` の順序は集約後も保たれます。
483
483
 
484
+ > **`publicHead` / `publicBodyEnd` はいつ描画される?**
485
+ > runtime は、ampless middleware が処理した公開リクエストでのみ
486
+ > これらのサーフェスの出力を描画します。`/admin`、`/login`、
487
+ > そして theme preview リクエスト(`?previewTheme=` /
488
+ > `?previewColorScheme=` iframe)では描画されません。これにより、
489
+ > GTM / GA / consent script が admin page view や live preview traffic で
490
+ > analytics を汚染することを防ぎます。この挙動は
491
+ > `@ampless/runtime` の npm update だけで反映され、サイトコードの変更は不要です。
492
+
484
493
  ### `publicBodyForPost` の使用例(Phase 4)
485
494
 
486
495
  `schema` capability を宣言してサーフェスを実装します:
@@ -603,6 +603,16 @@ interpolates that fragment directly:
603
603
  `cms.config.plugins` iteration order is preserved across the
604
604
  collected list.
605
605
 
606
+ > **When are `publicHead` / `publicBodyEnd` rendered?**
607
+ > The runtime renders output from these surfaces only on public requests
608
+ > that have been processed by the ampless middleware. They are **not**
609
+ > rendered under `/admin`, `/login`, or on theme-preview requests
610
+ > (`?previewTheme=` / `?previewColorScheme=` iframe). This prevents GTM,
611
+ > GA, and consent scripts from polluting analytics with admin page views
612
+ > or live-preview traffic. An npm update to `@ampless/runtime` is
613
+ > sufficient to pick up this behaviour — no changes to site code are
614
+ > required.
615
+
606
616
  ### `publicBodyForPost` example (Phase 4)
607
617
 
608
618
  Declare the `schema` capability and implement the surface:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ampless",
3
- "version": "1.0.0-beta.51",
3
+ "version": "1.0.0-beta.52",
4
4
  "description": "Serverless CMS for AWS Amplify",
5
5
  "license": "MIT",
6
6
  "type": "module",