@riebeckite/plugin-local-graph 0.0.30 → 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 CHANGED
@@ -36,12 +36,10 @@ after article content, to display the graph output.
36
36
 
37
37
  ## Advanced customization
38
38
 
39
- Set `render: false` to use the public data resolver `<getLocalGraph>` in a
40
- Site-owned location without duplicating the automatic graph. This leaves graph
41
- generation and published-neighbor filtering intact.
39
+ Resolve the graph with the public data helper and pass it to the component:
42
40
 
43
41
  ```tsx
44
- import LocalGraph, { getLocalGraph } from "@riebeckite/plugin-local-graph";
42
+ import { LocalGraph, getLocalGraph } from "@riebeckite/plugin-local-graph";
45
43
  import { content } from "virtual:riebeckite/content";
46
44
  import { getArticleTitle } from "../lib/article-title";
47
45
 
@@ -55,11 +53,11 @@ const graph = getLocalGraph({
55
53
 
56
54
  // ...in your route
57
55
  return (
58
- <aside>{graph && <LocalGraph graph={graph} />}</aside>
56
+ <aside>{graph ? <LocalGraph graph={graph} /> : null}</aside>
59
57
  );
60
58
  ```
61
59
 
62
- Remove the component to remove manually placed UI.
60
+ Render the component once per article. Remove the element to remove the UI.
63
61
 
64
62
  ## Configuration
65
63
 
package/README_ja.md CHANGED
@@ -32,7 +32,7 @@ export default defineConfig({ plugins: [localGraphPlugin()] });
32
32
  ```tsx
33
33
  import LocalGraph, { getLocalGraph } from "@riebeckite/plugin-local-graph";
34
34
  const graph = getLocalGraph({ manifest: await content.getManifest(), config, slug, resolveTitle });
35
- return <Article footerContent={graph && <LocalGraph graph={graph} />} />;
35
+ return <aside>{graph ? <LocalGraph graph={graph} /> : null}</aside>;
36
36
  ```
37
37
 
38
38
  グラフのノード位置は `layoutRadialGraph()`、辺は `buildGraphEdges()` が計算します。各ノードのリンクは解決済みの `permalink` を使い、見出しは internal selection key `/explore?note=<slug>` で Explorer を開きます。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-local-graph",
3
- "version": "0.0.30",
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/ui": "0.0.30",
26
- "@riebeckite/core": "0.0.30"
25
+ "@riebeckite/core": "0.0.31",
26
+ "@riebeckite/ui": "0.0.31"
27
27
  },
28
28
  "devDependencies": {
29
29
  "tsx": "^4.22.4",
30
- "@riebeckite/test": "0.0.30"
30
+ "@riebeckite/test": "0.0.31"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"