create-ampless 1.0.0-alpha.92 → 1.0.0-alpha.94

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/index.js CHANGED
@@ -1859,7 +1859,8 @@ var AMPLESS_PACKAGES = /* @__PURE__ */ new Set([
1859
1859
  "@ampless/plugin-analytics-ga4",
1860
1860
  "@ampless/plugin-gtm",
1861
1861
  "@ampless/plugin-plausible",
1862
- "@ampless/plugin-cookie-consent"
1862
+ "@ampless/plugin-cookie-consent",
1863
+ "@ampless/plugin-reading-time"
1863
1864
  ]);
1864
1865
  var AMPLESS_MANAGED_SCRIPTS = /* @__PURE__ */ new Set([
1865
1866
  "sandbox",
@@ -2,6 +2,7 @@ import { defineConfig } from 'ampless'
2
2
  import seoPlugin from '@ampless/plugin-seo'
3
3
  import rssPlugin from '@ampless/plugin-rss'
4
4
  // import schemaJsonLdPlugin from '@ampless/plugin-schema-jsonld'
5
+ // import readingTimePlugin from '@ampless/plugin-reading-time'
5
6
  // import cookieConsentPlugin from '@ampless/plugin-cookie-consent'
6
7
  // import analyticsGa4Plugin from '@ampless/plugin-analytics-ga4'
7
8
  // import gtmPlugin from '@ampless/plugin-gtm'
@@ -88,6 +89,13 @@ export default defineConfig({
88
89
  //
89
90
  // cookieConsentPlugin(),
90
91
  //
92
+ // Reading-time badge. Estimates read time from the post body and injects
93
+ // a configurable label (default: "3 min read") before or after the post
94
+ // content. Supports English word count + CJK character count (÷ 2).
95
+ // Label template and position are editable from `/admin/plugins`.
96
+ //
97
+ // readingTimePlugin(),
98
+ //
91
99
  // Google Analytics 4. Once registered here, the measurement ID can be
92
100
  // edited from `/admin/plugins` without a redeploy — the constructor
93
101
  // value below is just the initial default. Pass an empty string to
@@ -30,6 +30,7 @@
30
30
  "@ampless/plugin-gtm": "^0.2.0-alpha.11",
31
31
  "@ampless/plugin-og-image": "^0.2.0-alpha.28",
32
32
  "@ampless/plugin-plausible": "^0.2.0-alpha.11",
33
+ "@ampless/plugin-reading-time": "^0.1.0-alpha.1",
33
34
  "@ampless/plugin-rss": "^0.2.0-alpha.28",
34
35
  "@ampless/plugin-schema-jsonld": "^0.1.1-alpha.7",
35
36
  "@ampless/plugin-seo": "^0.2.0-alpha.28",
@@ -118,6 +118,10 @@ export default defineConfig({
118
118
  | `adminSettings` | `settings.public[]` で宣言する admin 編集可能な設定 |
119
119
  | `writePublicAsset` | trusted plugin が `public/plugins/<instanceId>/...` に書き込み |
120
120
  | `schema` | post ごとの JSON-LD を `publicBodyForPost` 経由で (テーマ側で `ampless.publicBodyForPost(post)` を呼ぶ前提) |
121
+ | `publicHtmlForPost` | post ごとの可視 HTML(読了時間バッジ等)を `publicHtmlForPost` 経由で(テーマ側で `ampless.publicHtmlForPost(post)` を呼ぶ前提) |
122
+
123
+ **`publicHtmlForPost` を使うファーストパーティプラグイン:**
124
+ - `@ampless/plugin-reading-time` — 投稿本文から読了時間を推定し、本文の前後に設定可能なバッジを注入します。
121
125
 
122
126
  [guide]: https://github.com/heavymoons/ampless/blob/main/packages/ampless/docs/plugin-author-guide.md
123
127
 
@@ -121,6 +121,10 @@ Capabilities currently active:
121
121
  | `adminSettings` | admin-editable settings declared via `settings.public[]` |
122
122
  | `writePublicAsset` | trusted plugins can write namespaced files under `public/plugins/<instanceId>/...` |
123
123
  | `schema` | per-post JSON-LD via `publicBodyForPost` (theme template must call `ampless.publicBodyForPost(post)`) |
124
+ | `publicHtmlForPost` | per-post visible HTML (e.g. reading-time badge, breadcrumbs) via `publicHtmlForPost` (theme template must call `ampless.publicHtmlForPost(post)`) |
125
+
126
+ **First-party plugins that use `publicHtmlForPost`:**
127
+ - `@ampless/plugin-reading-time` — estimates read time from the post body and injects a configurable badge before or after the content.
124
128
 
125
129
  [guide]: https://github.com/heavymoons/ampless/blob/main/packages/ampless/docs/plugin-author-guide.md
126
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "1.0.0-alpha.92",
3
+ "version": "1.0.0-alpha.94",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",