@riebeckite/plugin-discord-embed 0.0.32 → 0.0.34

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
@@ -65,7 +65,7 @@ See [HonoX Integration](https://github.com/Rerurate514/riebeckite/blob/main/docs
65
65
 
66
66
  ## Exports
67
67
 
68
- - `discordEmbed(options?)` / `discordEmbedPlugin(options?)` — plugin factory
68
+ - `discordEmbed(options?)` / `discordEmbed(options?)` — plugin factory
69
69
  - `buildDiscordHeadTags(entry, options, diagnostics)` — build one entry's head
70
70
  tags
71
71
  - `resolveDiscordEmbedOptions(options?)` — resolve defaults
package/README_ja.md CHANGED
@@ -12,7 +12,7 @@ Discord の `Discordbot` は共有されたページの `<head>` メタデータ
12
12
 
13
13
  [English](./README.md)
14
14
 
15
- ## 設定する
15
+ ## 設定
16
16
 
17
17
  ```ts
18
18
  import { defineConfig } from "@riebeckite/core";
@@ -34,7 +34,7 @@ export default defineConfig({
34
34
 
35
35
  `themeColor` は `#rgb`、`#rgba`、`#rrggbb`、`#rrggbbaa` のいずれかを受け付けます。
36
36
 
37
- ## Frontmatter
37
+ ## frontmatter
38
38
 
39
39
  | フィールド | 用途 |
40
40
  | --- | --- |
@@ -43,22 +43,22 @@ export default defineConfig({
43
43
  | `ogImageWidth` / `imageWidth` | 画像の幅 |
44
44
  | `ogImageHeight` / `imageHeight` | 画像の高さ |
45
45
 
46
- 色の解決順は、frontmatter の上書き、なければ `themeColor` オプションです。
46
+ 色は frontmatter の上書きを優先し、なければ `themeColor` オプションを使います。
47
47
  frontmatter の色が無効な場合は診断 `discord-embed-invalid-color`(warning)を記録し、オプションの既定値へフォールバックします。
48
48
 
49
49
  ## 出力するタグ
50
50
 
51
- `onManifestCreated` フックで、すべてのエントリーに `entry.headTags` を設定します。Site shell はこれらを文書の head に描画するため、記事本文には表示せず Discord などのクローラーが利用します。
51
+ `onManifestCreated` フックで、すべてのエントリーに `entry.headTags` を設定します。サイトシェルがこれらを文書の head に描画するため、記事本文には表示されません。Discord などのクローラーが利用します。
52
52
 
53
- ## Site shell が headTags を描画する
53
+ ## headTags を描画するのはサイトシェル
54
54
 
55
- このプラグインは `<head>` を所有しません。プラグインが提供するのは `ContentManifestEntry.headTags` であり、描画するかどうかは Site が決めます。
56
- Site の route が `c.set("headTags", entry.headTags ?? [])` を設定し、`app/routes/_renderer.tsx` がそれを `<meta>` / `<link>` / `<script>` に変換します。
57
- 詳しくは [HonoX Integration](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/framework/honox-integration.ja.md) の "Site Application の拡張取り決め" を参照してください。
55
+ このプラグインは `<head>` を所有しません。プラグインが提供するのは `ContentManifestEntry.headTags` であり、描画するかどうかはサイト側が決めます。
56
+ サイトのルートが `c.set("headTags", entry.headTags ?? [])` を設定し、`app/routes/_renderer.tsx` がそれを `<meta>` / `<link>` / `<script>` に変換します。
57
+ 詳しくは [HonoX Integration](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/framework/honox-integration.ja.md) の「責務の分担」を参照してください。
58
58
 
59
59
  ## 主なエクスポート
60
60
 
61
- - `discordEmbed(options?)` / `discordEmbedPlugin(options?)`: プラグインを作成する
61
+ - `discordEmbed(options?)` / `discordEmbed(options?)`: プラグインを作成する
62
62
  - `buildDiscordHeadTags(entry, options, diagnostics)`: エントリーの head タグを組み立てる
63
63
  - `resolveDiscordEmbedOptions(options?)`: 既定値を解決する
64
64
  - 型: `DiscordEmbedOptions`、`ResolvedDiscordEmbedOptions`
package/dist/index.d.ts CHANGED
@@ -12,4 +12,3 @@ export type { DiscordEmbedOptions, ResolvedDiscordEmbedOptions, } from "./src/ty
12
12
  * docs).
13
13
  */
14
14
  export declare function discordEmbed(options?: DiscordEmbedOptions): import("@riebeckite/core").RiebeckitePlugin<DiscordEmbedOptions>;
15
- export declare const discordEmbedPlugin: typeof discordEmbed;
package/dist/index.js CHANGED
@@ -114,11 +114,9 @@ function discordEmbed(options = {}) {
114
114
  }
115
115
  });
116
116
  }
117
- var discordEmbedPlugin = discordEmbed;
118
117
  export {
119
118
  DEFAULT_THEME_COLOR,
120
119
  buildDiscordHeadTags,
121
120
  discordEmbed,
122
- discordEmbedPlugin,
123
121
  resolveDiscordEmbedOptions
124
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-discord-embed",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,7 +14,7 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@riebeckite/core": "0.0.32"
17
+ "@riebeckite/core": "0.0.34"
18
18
  },
19
19
  "publishConfig": {
20
20
  "access": "public"