@riebeckite/plugin-webmention 0.0.20 → 0.0.22

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 (3) hide show
  1. package/README.md +6 -17
  2. package/README_ja.md +6 -17
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @riebeckite/plugin-webmention
2
2
 
3
+ <!-- Generated from docs/docs/plugins/webmention.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
4
+
3
5
  Receive Webmentions, verify that the source document really links to the
4
6
  target, store them through a pluggable provider, and render verified mentions
5
7
  near articles. The core plugin contains **no Cloudflare, Worker, database, or
@@ -40,7 +42,7 @@ export default {
40
42
 
41
43
  Without a provider the plugin uses an in-memory provider, which is fine for
42
44
  local previews but loses mentions between processes. Supply a durable adapter
43
- (see [`@riebeckite/webmention-cloudflare`](../../integrations/webmention-cloudflare/README.md))
45
+ (see [`@riebeckite/webmention-cloudflare`](https://github.com/Rerurate514/riebeckite/blob/main/packages/integrations/webmention-cloudflare/README.md))
44
46
  for production.
45
47
 
46
48
  ## Endpoints
@@ -56,19 +58,7 @@ Rejection codes: `invalid_request`, `missing_source_or_target`,
56
58
 
57
59
  ## Rendering
58
60
 
59
- At `onManifestCreated` the plugin queries the provider once, groups verified
60
- mentions by target, and appends a section to each matching entry's HTML. Core
61
- synchronizes that HTML with the content the route renders, using stable hooks:
62
-
63
- ```html
64
- <section class="rr-webmention" data-webmention data-webmention-count="2">
65
- <h2 class="rr-webmention__heading">Mentions</h2>
66
- <ul class="rr-webmention__list">
67
- <li class="rr-webmention__item rr-webmention__item--like"
68
- data-webmention-type="like">…</li>
69
- </ul>
70
- </section>
71
- ```
61
+ At `onManifestCreated` the plugin queries the provider once, groups verified mentions by target, and appends a live section to each matching entry. Core synchronizes it with the content the route renders.
72
62
 
73
63
  Set `render: false` to skip build-time injection. Applications that render at
74
64
  request time can call `getWebmentionsForEntry({ manifest, config, provider,
@@ -115,6 +105,5 @@ manifest time, mentions whose target is not a published entry are reported as
115
105
 
116
106
  ## See also
117
107
 
118
- - [Plugin guide](../../../docs/docs/reference/plugin-api.md)
119
- - [@riebeckite/webmention-cloudflare](../../integrations/webmention-cloudflare/README.md)
120
-
108
+ - [Plugin guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.md)
109
+ - [@riebeckite/webmention-cloudflare](https://github.com/Rerurate514/riebeckite/blob/main/packages/integrations/webmention-cloudflare/README.md)
package/README_ja.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @riebeckite/plugin-webmention
2
2
 
3
+ <!-- Generated from docs/docs/plugins/webmention.ja.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
4
+
3
5
  Webmention を受信し、送信元ドキュメントが本当にターゲットへリンクしているかを検証し、
4
6
  プラガブルな provider 経由で保存して、検証済みのメンションを記事の近くに表示します。
5
7
  コアプラグインには **Cloudflare・Worker・データベース・ベンダー固有のコードは一切なく**、
@@ -39,7 +41,7 @@ export default {
39
41
 
40
42
  provider を省略するとインメモリ provider が使われます。ローカルプレビューには
41
43
  十分ですが、プロセスをまたぐとメンションは失われます。本番では永続 adapter
42
- ([`@riebeckite/webmention-cloudflare`](../../integrations/webmention-cloudflare/README_ja.md) を参照)
44
+ ([`@riebeckite/webmention-cloudflare`](https://github.com/Rerurate514/riebeckite/blob/main/packages/integrations/webmention-cloudflare/README_ja.md) を参照)
43
45
  を指定してください。
44
46
 
45
47
  ## エンドポイント
@@ -54,19 +56,7 @@ provider を省略するとインメモリ provider が使われます。ロー
54
56
 
55
57
  ## 表示
56
58
 
57
- `onManifestCreated` で provider を一度 query し、検証済みメンションをターゲット別に
58
- グループ化して、対応する entry の HTML へセクションを追記します。Core がその HTML を
59
- コンテンツルートの描画 HTML と同期します。フックは安定した `rr-webmention` 名です。
60
-
61
- ```html
62
- <section class="rr-webmention" data-webmention data-webmention-count="2">
63
- <h2 class="rr-webmention__heading">Mentions</h2>
64
- <ul class="rr-webmention__list">
65
- <li class="rr-webmention__item rr-webmention__item--like"
66
- data-webmention-type="like">…</li>
67
- </ul>
68
- </section>
69
- ```
59
+ `onManifestCreated` で provider を一度 query し、検証済みメンションをターゲット別にグループ化して、対応する entry へ実際の表示セクションを追記します。Core はこれをコンテンツルートの描画内容と同期します。
70
60
 
71
61
  `render: false` でビルド時の追記を無効化できます。リクエスト時に描画する
72
62
  アプリケーションは `getWebmentionsForEntry({ manifest, config, provider, slug })` と
@@ -112,6 +102,5 @@ manifest 生成時、公開 entry に一致しないターゲットのメンシ
112
102
 
113
103
  ## 関連
114
104
 
115
- - [プラグインガイド](../../../docs/docs/reference/plugin-api.ja.md)
116
- - [@riebeckite/webmention-cloudflare](../../integrations/webmention-cloudflare/README_ja.md)
117
-
105
+ - [プラグインガイド](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.ja.md)
106
+ - [@riebeckite/webmention-cloudflare](https://github.com/Rerurate514/riebeckite/blob/main/packages/integrations/webmention-cloudflare/README_ja.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-webmention",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
- "@riebeckite/core": "0.0.20"
18
+ "@riebeckite/core": "0.0.22"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsx": "^4.22.4"