@intlayer/docs 8.0.0-canary.6 → 8.0.0

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 (73) hide show
  1. package/docs/ar/dictionary/content_file.md +30 -1
  2. package/docs/ar/dictionary/html.md +45 -56
  3. package/docs/ar/dictionary/markdown.md +21 -57
  4. package/docs/ar/releases/v8.md +11 -2
  5. package/docs/de/dictionary/content_file.md +30 -1
  6. package/docs/de/dictionary/html.md +45 -56
  7. package/docs/de/dictionary/markdown.md +21 -57
  8. package/docs/de/releases/v8.md +11 -2
  9. package/docs/en/dictionary/content_file.md +35 -1
  10. package/docs/en/dictionary/html.md +45 -56
  11. package/docs/en/dictionary/markdown.md +22 -58
  12. package/docs/en/releases/v8.md +11 -2
  13. package/docs/en-GB/dictionary/content_file.md +31 -2
  14. package/docs/en-GB/dictionary/html.md +45 -56
  15. package/docs/en-GB/dictionary/markdown.md +17 -53
  16. package/docs/en-GB/releases/v8.md +11 -2
  17. package/docs/es/dictionary/content_file.md +30 -2
  18. package/docs/es/dictionary/html.md +45 -56
  19. package/docs/es/dictionary/markdown.md +21 -57
  20. package/docs/es/releases/v8.md +11 -2
  21. package/docs/fr/dictionary/content_file.md +30 -1
  22. package/docs/fr/dictionary/html.md +45 -56
  23. package/docs/fr/dictionary/markdown.md +21 -57
  24. package/docs/fr/releases/v8.md +11 -2
  25. package/docs/hi/dictionary/content_file.md +33 -3
  26. package/docs/hi/dictionary/html.md +45 -56
  27. package/docs/hi/dictionary/markdown.md +21 -57
  28. package/docs/hi/releases/v8.md +10 -1
  29. package/docs/id/dictionary/content_file.md +30 -1
  30. package/docs/id/dictionary/html.md +45 -56
  31. package/docs/id/dictionary/markdown.md +21 -57
  32. package/docs/id/releases/v8.md +11 -2
  33. package/docs/it/dictionary/content_file.md +30 -1
  34. package/docs/it/dictionary/html.md +45 -56
  35. package/docs/it/dictionary/markdown.md +21 -57
  36. package/docs/it/releases/v8.md +11 -2
  37. package/docs/ja/dictionary/content_file.md +30 -1
  38. package/docs/ja/dictionary/html.md +45 -56
  39. package/docs/ja/dictionary/markdown.md +21 -57
  40. package/docs/ja/releases/v8.md +11 -2
  41. package/docs/ko/dictionary/content_file.md +30 -1
  42. package/docs/ko/dictionary/html.md +45 -56
  43. package/docs/ko/dictionary/markdown.md +21 -57
  44. package/docs/ko/releases/v8.md +11 -2
  45. package/docs/pl/dictionary/content_file.md +30 -1
  46. package/docs/pl/dictionary/html.md +45 -56
  47. package/docs/pl/dictionary/markdown.md +18 -54
  48. package/docs/pl/releases/v8.md +11 -2
  49. package/docs/pt/dictionary/content_file.md +30 -1
  50. package/docs/pt/dictionary/html.md +45 -56
  51. package/docs/pt/dictionary/markdown.md +21 -57
  52. package/docs/pt/releases/v8.md +11 -2
  53. package/docs/ru/dictionary/content_file.md +30 -1
  54. package/docs/ru/dictionary/html.md +45 -56
  55. package/docs/ru/dictionary/markdown.md +21 -57
  56. package/docs/ru/releases/v8.md +11 -2
  57. package/docs/tr/dictionary/content_file.md +30 -1
  58. package/docs/tr/dictionary/html.md +45 -56
  59. package/docs/tr/dictionary/markdown.md +17 -53
  60. package/docs/tr/releases/v8.md +11 -2
  61. package/docs/uk/dictionary/content_file.md +32 -3
  62. package/docs/uk/dictionary/html.md +45 -56
  63. package/docs/uk/dictionary/markdown.md +14 -50
  64. package/docs/uk/releases/v8.md +11 -2
  65. package/docs/vi/dictionary/content_file.md +30 -1
  66. package/docs/vi/dictionary/html.md +45 -56
  67. package/docs/vi/dictionary/markdown.md +19 -55
  68. package/docs/vi/releases/v8.md +11 -2
  69. package/docs/zh/dictionary/content_file.md +28 -2
  70. package/docs/zh/dictionary/html.md +45 -56
  71. package/docs/zh/dictionary/markdown.md +20 -56
  72. package/docs/zh/releases/v8.md +11 -2
  73. package/package.json +7 -7
@@ -31,47 +31,12 @@ history:
31
31
 
32
32
  Intlayer は HTML コンテンツをサポートしており、辞書内にリッチで構造化されたコンテンツを埋め込むことができます。このコンテンツは標準の HTML タグでレンダリングすることも、実行時にカスタムコンポーネントに置き換えることもできます。
33
33
 
34
- ## HTML の仕組み
35
-
36
- Intlayer v8 はコンテンツ文字列内の HTML タグを賢く検出します。文字列が HTML(タグを含む)と判定されると、自動的に HTML ノードに変換されます。
37
-
38
- <Columns>
39
- <Column title="v7 の挙動(手動でラップ)">
40
-
41
- ```typescript fileName="htmlDictionary.content.ts"
42
- import { html } from "intlayer";
43
-
44
- export default {
45
- key: "app",
46
- content: {
47
- text: html("<p>Hello <strong>World</strong></p>"),
48
- },
49
- };
50
- ```
51
-
52
- </Column>
53
- <Column title="v8 の挙動(自動検出)">
54
-
55
- ```typescript fileName="htmlDictionary.content.ts"
56
- export default {
57
- key: "app",
58
- content: {
59
- text: "<p>Hello <strong>World</strong></p>",
60
- },
61
- };
62
- ```
63
-
64
- </Column>
65
- </Columns>
66
-
67
- ---
68
-
69
34
  ## HTML コンテンツの宣言
70
35
 
71
36
  HTML コンテンツは `html` 関数を使って宣言するか、単に文字列として定義できます。
72
37
 
73
38
  <Tabs>
74
- <Tab label="手動ラッピング">
39
+ <Tab label="手動ラッピング" value="manual-wrapping">
75
40
  `html` 関数を使用して明示的に HTML コンテンツを宣言します。これにより、自動検出が無効になっている場合でも標準タグが正しくマッピングされることが保証されます。
76
41
 
77
42
  ```typescript fileName="htmlDictionary.content.ts"
@@ -88,7 +53,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
88
53
  ```
89
54
 
90
55
  </Tab>
91
- <Tab label="自動検出">
56
+ <Tab label="自動検出" value="automatic-detection">
92
57
  文字列に一般的なHTMLタグ(例: `<p>`, `<div>`, `<strong>`など)が含まれている場合、Intlayerは自動的にそれを変換します。
93
58
 
94
59
  ```typescript fileName="htmlDictionary.content.ts"
@@ -101,7 +66,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
101
66
  ```
102
67
 
103
68
  </Tab>
104
- <Tab label="外部ファイル">
69
+ <Tab label="外部ファイル" value="external-files">
105
70
  ファイルからHTMLコンテンツをインポートします。現在、`file()`関数は文字列を返し、タグが含まれている場合はHTMLとして自動検出される点に注意してください。
106
71
 
107
72
  ```typescript fileName="htmlDictionary.content.ts"
@@ -121,6 +86,30 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
121
86
  </Tab>
122
87
  </Tabs>
123
88
 
89
+ ### `html()` ノード
90
+
91
+ `html()` 関数は、Intlayer v8 の新機能で、辞書内で HTML コンテンツを明示的に定義できるようにします。Intlayer は多くの場合、HTML コンテンツを自動検出できますが、`html()` 関数を使用するといくつかの利点があります:
92
+
93
+ - **型安全性**: `html()` 関数を使用すると、カスタムコンポーネントに期待されるプロパティを定義でき、エディタでの補完や型チェックが向上します。
94
+ - **明示的な宣言**: 自動検出をトリガーする標準的な HTML タグが含まれていない場合でも、文字列が常に HTML として処理されるようにします。
95
+ - **カスタムコンポーネントの定義**: `html()` の第 2 引数に、カスタムコンポーネントとその期待されるプロパティ型を定義して渡すことができます。
96
+
97
+ ```typescript
98
+ import { html } from "intlayer";
99
+
100
+ const myContent = html(
101
+ "<MyCustomComponent title='こんにちは'>世界</MyCustomComponent>",
102
+ {
103
+ MyCustomComponent: {
104
+ title: "string",
105
+ children: "node",
106
+ },
107
+ }
108
+ );
109
+ ```
110
+
111
+ HTML ノードで `.use()` メソッドを使用する場合、提供されたコンポーネントは `html()` 関数で提供された定義(利用可能な場合)と照らし合わせてチェックされます。
112
+
124
113
  ---
125
114
 
126
115
  ## HTML のレンダリング
@@ -132,7 +121,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
132
121
  `useIntlayer` 経由でコンテンツにアクセスすると、HTML ノードは既にレンダリング可能な状態になっています。
133
122
 
134
123
  <Tabs group="framework">
135
- <Tab label="React / Next.js">
124
+ <Tab label="React / Next.js" value="react">
136
125
  HTML ノードはそのまま JSX としてレンダリングできます。標準的なタグは自動で動作します。
137
126
 
138
127
  ```tsx fileName="App.tsx"
@@ -154,7 +143,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
154
143
  ```
155
144
 
156
145
  </Tab>
157
- <Tab label="Vue">
146
+ <Tab label="Vue" value="vue">
158
147
  Vueでは、HTMLコンテンツを組み込みの `component` を使ってレンダリングできます。
159
148
 
160
149
  ```vue fileName="App.vue"
@@ -174,7 +163,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
174
163
  ```
175
164
 
176
165
  </Tab>
177
- <Tab label="Svelte">
166
+ <Tab label="Svelte" value="svelte">
178
167
  SvelteはHTMLノードを文字列としてレンダリングします。`{@html}` を使ってレンダリングしてください。
179
168
 
180
169
  ```svelte
@@ -187,7 +176,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
187
176
  ```
188
177
 
189
178
  </Tab>
190
- <Tab label="Preact">
179
+ <Tab label="Preact" value="preact">
191
180
  PreactはJSXでHTMLノードを直接サポートします。
192
181
 
193
182
  ```tsx fileName="App.tsx"
@@ -200,7 +189,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
200
189
  ```
201
190
 
202
191
  </Tab>
203
- <Tab label="Solid">
192
+ <Tab label="Solid" value="solid">
204
193
  SolidはJSXでHTMLノードを直接サポートします。
205
194
 
206
195
  ```tsx fileName="App.tsx"
@@ -213,7 +202,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
213
202
  ```
214
203
 
215
204
  </Tab>
216
- <Tab label="Angular">
205
+ <Tab label="Angular" value="angular">
217
206
  Angularは `[innerHTML]` ディレクティブを使用してHTMLコンテンツをレンダリングします。
218
207
 
219
208
  ```typescript fileName="app.component.ts"
@@ -246,7 +235,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
246
235
  アプリ全体でHTMLレンダリングをグローバルに設定できます。これは、すべてのHTMLコンテンツで利用可能にしたいカスタムコンポーネントを定義するのに最適です。
247
236
 
248
237
  <Tabs group="framework">
249
- <Tab label="React / Next.js">
238
+ <Tab label="React / Next.js" value="react">
250
239
 
251
240
  ```tsx fileName="AppProvider.tsx"
252
241
  import { HTMLProvider } from "react-intlayer";
@@ -264,7 +253,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
264
253
  ```
265
254
 
266
255
  </Tab>
267
- <Tab label="Vue">
256
+ <Tab label="Vue" value="vue">
268
257
 
269
258
  ```typescript fileName="main.ts"
270
259
  import { createApp, h } from "vue";
@@ -285,7 +274,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
285
274
  ```
286
275
 
287
276
  </Tab>
288
- <Tab label="Svelte">
277
+ <Tab label="Svelte" value="svelte">
289
278
 
290
279
  ```svelte fileName="App.svelte"
291
280
  <script lang="ts">
@@ -303,7 +292,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
303
292
  ```
304
293
 
305
294
  </Tab>
306
- <Tab label="Preact">
295
+ <Tab label="Preact" value="preact">
307
296
 
308
297
  ```tsx fileName="AppProvider.tsx"
309
298
  import { HTMLProvider } from "preact-intlayer";
@@ -320,7 +309,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
320
309
  ```
321
310
 
322
311
  </Tab>
323
- <Tab label="Solid">
312
+ <Tab label="Solid" value="solid">
324
313
 
325
314
  ```tsx fileName="AppProvider.tsx"
326
315
  import { HTMLProvider } from "solid-intlayer";
@@ -337,7 +326,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
337
326
  ```
338
327
 
339
328
  </Tab>
340
- <Tab label="Angular">
329
+ <Tab label="Angular" value="angular">
341
330
 
342
331
  ```typescript fileName="app.config.ts"
343
332
  import { createIntlayerMarkdownProvider } from "angular-intlayer";
@@ -364,7 +353,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
364
353
  生のHTML文字列をレンダリングしたり、コンポーネントのマッピングをより細かく制御したい場合は、次のツールを使用してください。
365
354
 
366
355
  <Tabs group="framework">
367
- <Tab label="React / Next.js">
356
+ <Tab label="React / Next.js" value="react">
368
357
  #### `<HTMLRenderer />` コンポーネント
369
358
  特定のコンポーネントでHTML文字列をレンダリングします。
370
359
 
@@ -401,7 +390,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
401
390
  ```
402
391
 
403
392
  </Tab>
404
- <Tab label="Vue">
393
+ <Tab label="Vue" value="vue">
405
394
 
406
395
  #### `<HTMLRenderer />` コンポーネント
407
396
 
@@ -416,7 +405,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
416
405
  ```
417
406
 
418
407
  </Tab>
419
- <Tab label="Svelte">
408
+ <Tab label="Svelte" value="svelte">
420
409
 
421
410
  #### `<HTMLRenderer />` コンポーネント
422
411
 
@@ -450,7 +439,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
450
439
  ```
451
440
 
452
441
  </Tab>
453
- <Tab label="Preact">
442
+ <Tab label="Preact" value="preact">
454
443
 
455
444
  #### `<HTMLRenderer />` コンポーネント
456
445
 
@@ -481,7 +470,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
481
470
  ```
482
471
 
483
472
  </Tab>
484
- <Tab label="Solid">
473
+ <Tab label="Solid" value="solid">
485
474
 
486
475
  #### `<HTMLRenderer />` コンポーネント
487
476
 
@@ -512,7 +501,7 @@ HTML コンテンツは `html` 関数を使って宣言するか、単に文字
512
501
  ```
513
502
 
514
503
  </Tab>
515
- <Tab label="Angular">
504
+ <Tab label="Angular" value="angular">
516
505
  #### `IntlayerMarkdownService` サービス
517
506
  サービスを使用してHTML文字列をレンダリングします。
518
507
 
@@ -32,48 +32,12 @@ history:
32
32
 
33
33
  Intlayerは、マークダウン構文を使用して定義されたリッチテキストコンテンツをサポートします。これにより、ブログや記事などのリッチなフォーマットを簡単に作成および管理できます。
34
34
 
35
- ## マークダウンの仕組み
36
-
37
- Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く検出します。文字列がマークダウンと判定されると、自動的にマークダウンノードに変換されます。
38
-
39
- <Columns>
40
- <Column title="v7 の挙動(手動でラップ)">
41
-
42
- ```typescript fileName="markdownDictionary.content.ts"
43
- import { md } from "intlayer";
44
-
45
- export default {
46
- key: "app",
47
- content: {
48
- text: md("## My title \n\nLorem Ipsum"),
49
- },
50
- };
51
- ```
52
-
53
- </Column>
54
- <Column title="v8 の挙動(自動検出)">
55
-
56
- ```typescript fileName="markdownDictionary.content.ts"
57
- export default {
58
- key: "app",
59
- contentAutoTransformation: true, // マークダウンコンテンツの自動検出を有効にする - intlayer.config.ts でグローバルに設定可能
60
- content: {
61
- text: "## My title \n\nLorem Ipsum",
62
- },
63
- };
64
- ```
65
-
66
- </Column>
67
- </Columns>
68
-
69
- ---
70
-
71
35
  ## パート 1: マークダウンコンテンツの宣言
72
36
 
73
37
  マークダウンコンテンツは `md` 関数を使って宣言するか、単に文字列として(マークダウン構文が含まれている場合)定義できます。
74
38
 
75
39
  <Tabs>
76
- <Tab label="手動ラッピング">
40
+ <Tab label="手動ラッピング" value="manual-wrapping">
77
41
  `md` 関数を使用して明示的にマークダウンコンテンツを宣言します。これは、明らかな構文が含まれていない場合でも文字列をマークダウンとして扱いたい場合に便利です。
78
42
 
79
43
  ```typescript fileName="markdownDictionary.content.ts"
@@ -90,7 +54,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
90
54
  ```
91
55
 
92
56
  </Tab>
93
- <Tab label="自動検出">
57
+ <Tab label="自動検出" value="automatic-detection">
94
58
  文字列に一般的なマークダウン指標(ヘッダー、リスト、リンクなど)が含まれている場合、Intlayerは自動的にそれを変換します。
95
59
 
96
60
  ```typescript fileName="markdownDictionary.content.ts"
@@ -104,7 +68,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
104
68
  ```
105
69
 
106
70
  </Tab>
107
- <Tab label="外部ファイル">
71
+ <Tab label="外部ファイル" value="external-files">
108
72
  `file` 関数を使用して `.md` ファイルを直接インポートします。
109
73
 
110
74
  ```typescript fileName="markdownDictionary.content.ts"
@@ -135,7 +99,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
135
99
  `useIntlayer` 経由でコンテンツにアクセスすると、マークダウンノードは既にレンダリング可能な状態になっています。
136
100
 
137
101
  <Tabs group="framework">
138
- <Tab label="React / Next.js">
102
+ <Tab label="React / Next.js" value="react">
139
103
  マークダウンノードはそのまま JSX としてレンダリングできます。
140
104
 
141
105
  ```tsx fileName="App.tsx"
@@ -156,7 +120,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
156
120
  ```
157
121
 
158
122
  </Tab>
159
- <Tab label="Vue">
123
+ <Tab label="Vue" value="vue">
160
124
  Vueでは、マークダウンコンテンツを組み込みの `component` を使って、または直接ノードとしてレンダリングできます。
161
125
 
162
126
  ```vue fileName="App.vue"
@@ -171,7 +135,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
171
135
  ```
172
136
 
173
137
  </Tab>
174
- <Tab label="Svelte">
138
+ <Tab label="Svelte" value="svelte">
175
139
  SvelteはデフォルトでマークダウンをHTML文字列としてレンダリングします。`{@html}` を使ってレンダリングしてください。
176
140
 
177
141
  ```svelte
@@ -184,7 +148,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
184
148
  ```
185
149
 
186
150
  </Tab>
187
- <Tab label="Preact">
151
+ <Tab label="Preact" value="preact">
188
152
  PreactはJSXでマークダウンノードを直接サポートします。
189
153
 
190
154
  ```tsx fileName="App.tsx"
@@ -197,7 +161,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
197
161
  ```
198
162
 
199
163
  </Tab>
200
- <Tab label="Solid">
164
+ <Tab label="Solid" value="solid">
201
165
  SolidはJSXでマークダウンノードを直接サポートします。
202
166
 
203
167
  ```tsx fileName="App.tsx"
@@ -210,7 +174,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
210
174
  ```
211
175
 
212
176
  </Tab>
213
- <Tab label="Angular">
177
+ <Tab label="Angular" value="angular">
214
178
  Angularは `[innerHTML]` ディレクティブを使用してマークダウンコンテンツをレンダリングします。
215
179
 
216
180
  ```typescript fileName="app.component.ts"
@@ -242,7 +206,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
242
206
  生のマークダウン文字列をレンダリングしたり、レンダリングプロセスをより詳細に制御したい場合は、次のツールを使用してください。
243
207
 
244
208
  <Tabs group="framework">
245
- <Tab label="React / Next.js">
209
+ <Tab label="React / Next.js" value="react">
246
210
 
247
211
  #### `<MarkdownRenderer />` コンポーネント
248
212
 
@@ -281,7 +245,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
281
245
  ```
282
246
 
283
247
  </Tab>
284
- <Tab label="Vue">
248
+ <Tab label="Vue" value="vue">
285
249
 
286
250
  #### `<MarkdownRenderer />` コンポーネント
287
251
 
@@ -296,7 +260,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
296
260
  ```
297
261
 
298
262
  </Tab>
299
- <Tab label="Svelte">
263
+ <Tab label="Svelte" value="svelte">
300
264
 
301
265
  #### `<MarkdownRenderer />` コンポーネント
302
266
 
@@ -330,7 +294,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
330
294
  ```
331
295
 
332
296
  </Tab>
333
- <Tab label="Preact">
297
+ <Tab label="Preact" value="preact">
334
298
  #### `<MarkdownRenderer />` コンポーネント
335
299
 
336
300
  ```tsx
@@ -360,7 +324,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
360
324
  ```
361
325
 
362
326
  </Tab>
363
- <Tab label="Solid">
327
+ <Tab label="Solid" value="solid">
364
328
  #### `<MarkdownRenderer />` コンポーネント
365
329
 
366
330
  ```tsx
@@ -390,7 +354,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
390
354
  ```
391
355
 
392
356
  </Tab>
393
- <Tab label="Angular">
357
+ <Tab label="Angular" value="angular">
394
358
  #### `IntlayerMarkdownService` サービス
395
359
  サービスを使用してマークダウン文字列をレンダリングします。
396
360
 
@@ -416,7 +380,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
416
380
  アプリ全体でマークダウンレンダリングをグローバルに設定できます。これにより、すべてのレンダラーに同じプロップを渡す手間が省けます。
417
381
 
418
382
  <Tabs group="framework">
419
- <Tab label="React / Next.js">
383
+ <Tab label="React / Next.js" value="react">
420
384
 
421
385
  ```tsx fileName="AppProvider.tsx"
422
386
  import { MarkdownProvider } from "react-intlayer";
@@ -436,7 +400,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
436
400
  ```
437
401
 
438
402
  </Tab>
439
- <Tab label="Vue">
403
+ <Tab label="Vue" value="vue">
440
404
 
441
405
  ```typescript fileName="main.ts"
442
406
  import { createApp } from "vue";
@@ -461,7 +425,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
461
425
  ```
462
426
 
463
427
  </Tab>
464
- <Tab label="Svelte">
428
+ <Tab label="Svelte" value="svelte">
465
429
 
466
430
  ```svelte fileName="App.svelte"
467
431
  <script lang="ts">
@@ -481,7 +445,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
481
445
  ```
482
446
 
483
447
  </Tab>
484
- <Tab label="Preact">
448
+ <Tab label="Preact" value="preact">
485
449
 
486
450
  ```tsx fileName="AppProvider.tsx"
487
451
  import { MarkdownProvider } from "preact-intlayer";
@@ -500,7 +464,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
500
464
  ```
501
465
 
502
466
  </Tab>
503
- <Tab label="Solid">
467
+ <Tab label="Solid" value="solid">
504
468
 
505
469
  ```tsx fileName="AppProvider.tsx"
506
470
  import { MarkdownProvider } from "solid-intlayer";
@@ -519,7 +483,7 @@ Intlayer v8 はコンテンツ文字列内のマークダウン構文を賢く
519
483
  ```
520
484
 
521
485
  </Tab>
522
- <Tab label="Angular">
486
+ <Tab label="Angular" value="angular">
523
487
 
524
488
  ```typescript fileName="app.config.ts"
525
489
  import { createIntlayerMarkdownProvider } from "angular-intlayer";
@@ -12,6 +12,7 @@ keywords:
12
12
  - Next.js
13
13
  - JavaScript
14
14
  - TypeScript
15
+ youtubeVideo: https://www.youtube.com/watch?v=ia6JmVf-kkU
15
16
  slugs:
16
17
  - doc
17
18
  - releases
@@ -22,6 +23,14 @@ slugs:
22
23
 
23
24
  Intlayer v8 へようこそ!このリリースでは、自動コンテンツ検出による開発者体験の向上、スキーマ検証によるデータ整合性の確保、辞書管理に対するより細かい制御の提供に注力しています。
24
25
 
26
+ <iframe
27
+ src="https://www.youtube.com/embed/ia6JmVf-kkU"
28
+ className="m-auto overflow-hidden rounded-lg border-0 max-md:size-full max-md:h-[700px] md:aspect-16/9 md:w-full"
29
+ title="Demo Video - New Intlayer v8 - What's new?"
30
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
31
+ loading="lazy"
32
+ />
33
+
25
34
  ## 目次
26
35
 
27
36
  <TOC levels={[2]} maxDepth={1} />
@@ -1198,8 +1207,8 @@ Svelte 内の Markdown および HTML コンテンツは、文字列化(string
1198
1207
 
1199
1208
  ### 設定の変更
1200
1209
 
1201
- - **`live` プロパティ**: 辞書内の `live` プロパティは非推奨になりました。代わりに `importMode: 'fetch'` を使用してください。
1202
- - **統合されたリッチコンテンツ API**: 新しい `.use()` メソッドは、Markdown HTML の両方の上書きに使用されるようになり、すべてのリッチコンテンツタイプで一貫した API を提供します。
1210
+ - **`live` プロパティ**: 辞書内の `live` プロパティは削除されました。代わりに `importMode: 'fetch'` を使用してください。
1211
+ - **importMode**: 設定内の `build.importMode` プロパティは非推奨になりました。代わりに `dictionary.importMode` を使用してください。
1203
1212
  - **`contentDir` と `codeDir`**: `contentDir` はコンテンツファイル専用になりました。コード変換用に新しく `codeDir` プロパティが追加されました。`codeDir` が設定されていない場合、Intlayer は `contentDir` にフォールバックし、警告をログに出力します。
1204
1213
  - **スキーマ検証**: 新しい `schema` 機能を使用するには、プロジェクトに `zod` がインストールされていることを確認してください。
1205
1214
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2025-02-07
3
- updatedAt: 2026-01-24
3
+ updatedAt: 2026-01-28
4
4
  title: 콘텐츠 파일
5
5
  description: 콘텐츠 선언 파일의 확장자를 사용자 정의하는 방법을 배우세요. 이 문서를 따라 프로젝트에서 조건을 효율적으로 구현하세요.
6
6
  keywords:
@@ -12,6 +12,9 @@ slugs:
12
12
  - concept
13
13
  - content
14
14
  history:
15
+ - version: 8.0.0
16
+ date: 2026-01-28
17
+ changes: `html` 콘텐츠 노드 타입 추가
15
18
  - version: 8.0.0
16
19
  date: 2026-01-24
17
20
  changes: Rename `live` import mode to `fetch` to better describe the underlying mechanism.
@@ -81,6 +84,7 @@ interface Content {
81
84
  quantityContent: string;
82
85
  conditionalContent: string;
83
86
  markdownContent: never;
87
+ htmlContent: never;
84
88
  externalContent: string;
85
89
  insertionContent: string;
86
90
  nestedContent: string;
@@ -126,6 +130,7 @@ export default {
126
130
  fileContent: file("./path/to/file.txt"),
127
131
  externalContent: fetch("https://example.com").then((res) => res.json()),
128
132
  markdownContent: md("# 마크다운 예제"),
133
+ htmlContent: html("<p>Hello <strong>World</strong></p>"),
129
134
 
130
135
  /*
131
136
  * `react-intlayer` 또는 `next-intlayer`를 사용할 때만 사용 가능
@@ -175,6 +180,7 @@ export default {
175
180
  "login.button" // [선택 사항] 중첩할 콘텐츠의 경로
176
181
  ),
177
182
  markdownContent: md("# 마크다운 예제"),
183
+ htmlContent: html("<p>Hello <strong>World</strong></p>"),
178
184
  fileContent: file("./path/to/file.txt"),
179
185
  externalContent: fetch("https://example.com").then((res) => res.json())
180
186
 
@@ -225,6 +231,7 @@ module.exports = {
225
231
  "login.button" // [선택 사항] 중첩할 콘텐츠 경로
226
232
  ),
227
233
  markdownContent: md("# 마크다운 예제"),
234
+ htmlContent: html("<p>Hello <strong>World</strong></p>"),
228
235
  fileContent: file("./path/to/file.txt"),
229
236
  externalContent: fetch("https://example.com").then((res) => res.json())
230
237
 
@@ -286,6 +293,10 @@ module.exports = {
286
293
  "nodeType": "markdown",
287
294
  "markdown": "# 마크다운 예제",
288
295
  },
296
+ "htmlContent": {
297
+ "nodeType": "html",
298
+ "html": "<p>Hello <strong>World</strong></p>",
299
+ },
289
300
  "fileContent": {
290
301
  "nodeType": "file",
291
302
  "file": "./path/to/file.txt",
@@ -320,6 +331,7 @@ Intlayer는 타입이 지정된 노드를 통해 다양한 콘텐츠 유형을
320
331
  - **열거형 콘텐츠**: 열거된 값에 따라 달라지는 콘텐츠 [열거형 콘텐츠 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/enumeration_content.md)
321
332
  - **삽입 콘텐츠**: 다른 콘텐츠에 삽입할 수 있는 콘텐츠 [삽입 콘텐츠 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/insertion_content.md)
322
333
  - **Markdown Content**: 마크다운 형식의 리치 텍스트 콘텐츠 [Markdown Content 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/markdown_content.md)
334
+ - **HTML Content**: 선택적 사용자 정의 컴포넌트가 있는 리치 HTML 콘텐츠 [HTML Content 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/html.md)
323
335
  - **Nested Content**: 다른 사전을 참조하는 콘텐츠 [Nested Content 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/nested_content.md)
324
336
  - **Gender Content**: 성별에 따라 달라지는 콘텐츠 [Gender Content 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/gender_content.md)
325
337
  - **File Content**: 외부 파일을 참조하는 콘텐츠 [File Content 보기](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ko/dictionary/file_content.md)
@@ -712,6 +724,23 @@ markdownContent: md(
712
724
  );
713
725
  ```
714
726
 
727
+ ### HTML 콘텐츠 (`html`)
728
+
729
+ 표준 태그 또는 사용자 정의 컴포넌트를 사용할 수 있는 리치 HTML 콘텐츠:
730
+
731
+ ```typescript
732
+ import { html, file, t } from "intlayer";
733
+
734
+ // 인라인 HTML
735
+ htmlContent: html("<p>Hello <strong>World</strong></p>");
736
+
737
+ // 외부 파일의 로케일별 HTML
738
+ localizedHtmlContent: t({
739
+ en: html(file("./content.en.html")),
740
+ ko: html(file("./content.ko.html")),
741
+ });
742
+ ```
743
+
715
744
  ### 성별에 따른 콘텐츠 (`gender`)
716
745
 
717
746
  성별에 따라 달라지는 콘텐츠: