@riebeckite/plugin-share 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.
- package/README.md +6 -21
- package/README_ja.md +6 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @riebeckite/plugin-share
|
|
2
2
|
|
|
3
|
+
<!-- Generated from docs/docs/plugins/share.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
|
|
4
|
+
|
|
3
5
|
Per-article share controls built at build time. For every published entry the
|
|
4
6
|
plugin builds share URLs for the configured services and injects the controls
|
|
5
7
|
into the rendered HTML. The links are ordinary anchors and work without
|
|
@@ -68,26 +70,9 @@ share({
|
|
|
68
70
|
`share` throws a configuration error at `riebeckite check` time when
|
|
69
71
|
`services` includes `"mastodon"` but `mastodonInstance` is missing.
|
|
70
72
|
|
|
71
|
-
##
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<div class="rr-share" data-rr-share data-rr-share-placement="bottom"
|
|
75
|
-
role="group" aria-label="Share">
|
|
76
|
-
<ul class="rr-share__list">
|
|
77
|
-
<li class="rr-share__item">
|
|
78
|
-
<a class="rr-share__link rr-share__link--x"
|
|
79
|
-
href="https://twitter.com/intent/tweet?url=…&text=…"
|
|
80
|
-
target="_blank" rel="noopener noreferrer" data-share-service="x">X</a>
|
|
81
|
-
</li>
|
|
82
|
-
<li class="rr-share__item">
|
|
83
|
-
<button type="button" class="rr-share__button rr-share__copy"
|
|
84
|
-
data-rr-share-copy data-share-url="https://example.com/posts/hello"
|
|
85
|
-
data-rr-share-copied="Copied" hidden>Copy link</button>
|
|
86
|
-
</li>
|
|
87
|
-
</ul>
|
|
88
|
-
<p class="rr-share__status" role="status" aria-live="polite"></p>
|
|
89
|
-
</div>
|
|
90
|
-
```
|
|
73
|
+
## Display
|
|
74
|
+
|
|
75
|
+
Share controls are rendered at the configured position on each public article. On this site they appear as live controls on the page, including the progressively enhanced copy-link action.
|
|
91
76
|
|
|
92
77
|
## Progressive enhancement
|
|
93
78
|
|
|
@@ -138,4 +123,4 @@ optional `className` is added to the root without replacing them.
|
|
|
138
123
|
|
|
139
124
|
## See also
|
|
140
125
|
|
|
141
|
-
- [Plugin guide](
|
|
126
|
+
- [Plugin guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.md)
|
package/README_ja.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @riebeckite/plugin-share
|
|
2
2
|
|
|
3
|
+
<!-- Generated from docs/docs/plugins/share.ja.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
|
|
4
|
+
|
|
3
5
|
記事ごとの共有ボタンをビルド時に生成するプラグインです。公開対象の各エントリ
|
|
4
6
|
について、設定したサービス向けの共有 URL を組み立て、本文の近くにコントロール
|
|
5
7
|
を挿入します。共有リンクは通常の `<a>` なので JavaScript なしでも動作し、コピー
|
|
@@ -67,26 +69,9 @@ share({
|
|
|
67
69
|
`services` に `"mastodon"` を含めたのに `mastodonInstance` が未設定の場合、
|
|
68
70
|
`riebeckite check` の時点で設定エラーになります。
|
|
69
71
|
|
|
70
|
-
##
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<div class="rr-share" data-rr-share data-rr-share-placement="bottom"
|
|
74
|
-
role="group" aria-label="Share">
|
|
75
|
-
<ul class="rr-share__list">
|
|
76
|
-
<li class="rr-share__item">
|
|
77
|
-
<a class="rr-share__link rr-share__link--x"
|
|
78
|
-
href="https://twitter.com/intent/tweet?url=…&text=…"
|
|
79
|
-
target="_blank" rel="noopener noreferrer" data-share-service="x">X</a>
|
|
80
|
-
</li>
|
|
81
|
-
<li class="rr-share__item">
|
|
82
|
-
<button type="button" class="rr-share__button rr-share__copy"
|
|
83
|
-
data-rr-share-copy data-share-url="https://example.com/posts/hello"
|
|
84
|
-
data-rr-share-copied="Copied" hidden>Copy link</button>
|
|
85
|
-
</li>
|
|
86
|
-
</ul>
|
|
87
|
-
<p class="rr-share__status" role="status" aria-live="polite"></p>
|
|
88
|
-
</div>
|
|
89
|
-
```
|
|
72
|
+
## 表示
|
|
73
|
+
|
|
74
|
+
共有コントロールは、公開記事ごとに設定した位置へ実際に描画されます。このサイトでは、プログレッシブ・エンハンスメントされたリンクコピー操作を含むコントロールとして表示します。
|
|
90
75
|
|
|
91
76
|
## プログレッシブ・エンハンスメント
|
|
92
77
|
|
|
@@ -138,4 +123,4 @@ import "@riebeckite/plugin-share/style.css";
|
|
|
138
123
|
|
|
139
124
|
## 関連
|
|
140
125
|
|
|
141
|
-
- [プラグインガイド](
|
|
126
|
+
- [プラグインガイド](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.ja.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-share",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"./style.css": "./style.css"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@riebeckite/core": "0.0.
|
|
24
|
+
"@riebeckite/core": "0.0.22"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"tsx": "^4.22.4"
|