@riebeckite/plugin-related-posts 0.0.29 → 0.0.31
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 +7 -12
- package/README_ja.md +7 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- Generated from docs/docs/plugins/related-posts.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
|
|
4
4
|
|
|
5
|
-
Build-time
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
required.
|
|
5
|
+
Build-time related-notes navigation. For every published entry, the plugin ranks
|
|
6
|
+
the other entries in the content manifest and exposes the result. The Site
|
|
7
|
+
renders the `<RelatedPosts />` component itself, normally once after article
|
|
8
|
+
content. No client-side JavaScript is required.
|
|
10
9
|
|
|
11
10
|
[日本語](./README_ja.md)
|
|
12
11
|
|
|
@@ -44,9 +43,8 @@ export default defineConfig({
|
|
|
44
43
|
## Advanced customization
|
|
45
44
|
|
|
46
45
|
The Site can place the public server-rendered `<RelatedPosts />` component
|
|
47
|
-
anywhere.
|
|
48
|
-
|
|
49
|
-
public helpers.
|
|
46
|
+
anywhere. Resolve entries with the public helpers and pass them explicitly, or
|
|
47
|
+
let the component resolve context.
|
|
50
48
|
|
|
51
49
|
```tsx
|
|
52
50
|
import {
|
|
@@ -61,9 +59,7 @@ const entries = buildRelatedPosts({ manifest, entry, options, config });
|
|
|
61
59
|
return <nav rb-related-posts><RelatedPosts entries={entries} options={options} /></nav>;
|
|
62
60
|
```
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
component to remove a manual placement. Do not use it alongside automatic
|
|
66
|
-
rendering for the same article.
|
|
62
|
+
Render the component once per article. Remove the element to remove the UI.
|
|
67
63
|
|
|
68
64
|
## Options
|
|
69
65
|
|
|
@@ -87,7 +83,6 @@ relatedPosts({
|
|
|
87
83
|
|
|
88
84
|
## Display
|
|
89
85
|
|
|
90
|
-
Related entries are rendered in the `article.footer` area on eligible pages.
|
|
91
86
|
This site renders the live navigation below the article when matching public
|
|
92
87
|
entries exist.
|
|
93
88
|
|
package/README_ja.md
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- Generated from docs/docs/plugins/related-posts.ja.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
ビルド時に「関連ノート」ナビゲーションのデータを生成するプラグインです。公開対象の
|
|
6
|
+
各エントリについて、コンテンツマニフェスト上の他のエントリをスコア順に並べます。
|
|
7
|
+
Site が `<RelatedPosts />` コンポーネントを記事の後などに配置します。クライアント側
|
|
8
|
+
JavaScript は不要です。
|
|
8
9
|
|
|
9
10
|
[English](./README.md)
|
|
10
11
|
|
|
@@ -42,8 +43,7 @@ export default defineConfig({
|
|
|
42
43
|
## 高度なカスタマイズ
|
|
43
44
|
|
|
44
45
|
Site のレイアウト内で任意の位置に配置できるサーバー描画の Hono JSX Component
|
|
45
|
-
|
|
46
|
-
既存の helper で entries を計算して解決済み options を渡してください。採点と公開境界のフィルタリングは維持されます。
|
|
46
|
+
を公開しています。helper で entries を計算して解決済み options を渡してください。採点と公開境界のフィルタリングは維持されます。
|
|
47
47
|
|
|
48
48
|
```tsx
|
|
49
49
|
import { buildRelatedPosts, RelatedPosts, resolveRelatedPostsOptions } from "@riebeckite/plugin-related-posts";
|
|
@@ -54,7 +54,7 @@ const entries = buildRelatedPosts({ manifest, entry, options, config });
|
|
|
54
54
|
<nav rb-related-posts><RelatedPosts entries={entries} options={options} /></nav>;
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
1つの記事につき1回だけ描画してください。UI を外すにはコンポーネントを取り除きます。
|
|
58
58
|
|
|
59
59
|
## オプション
|
|
60
60
|
|
|
@@ -78,8 +78,7 @@ relatedPosts({
|
|
|
78
78
|
|
|
79
79
|
## 表示
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
サイトでは、条件に合う公開エントリがあれば記事下に実際のナビゲーションを
|
|
81
|
+
このサイトでは、条件に合う公開エントリがあれば記事下に実際のナビゲーションを
|
|
83
82
|
表示します。
|
|
84
83
|
|
|
85
84
|
## スタイル
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-related-posts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"hono": "^4.12.25",
|
|
25
|
-
"@riebeckite/
|
|
26
|
-
"@riebeckite/
|
|
25
|
+
"@riebeckite/ui": "0.0.31",
|
|
26
|
+
"@riebeckite/core": "0.0.31"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"tsx": "^4.22.4",
|
|
30
|
-
"@riebeckite/test": "0.0.
|
|
30
|
+
"@riebeckite/test": "0.0.31"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|