@intlayer/docs 6.0.1 → 6.0.2-canary.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.
- package/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs +6 -5
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +318 -1863
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +1317 -6282
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +197 -1182
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +43 -84
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs +2 -5
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +318 -1863
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +1317 -6282
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +197 -1182
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +43 -84
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/types/blog.d.ts +1 -1
- package/dist/types/blog.d.ts.map +1 -1
- package/dist/types/common.d.ts +1 -1
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/generated/blog.entry.d.ts +1 -1
- package/dist/types/generated/blog.entry.d.ts.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +2 -1
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/dist/types/generated/legal.entry.d.ts +1 -1
- package/dist/types/generated/legal.entry.d.ts.map +1 -1
- package/docs/ar/intlayer_CMS.md +261 -85
- package/docs/ar/releases/v6.md +273 -0
- package/docs/ar/roadmap.md +1 -3
- package/docs/ar/vs_code_extension.md +94 -63
- package/docs/de/intlayer_CMS.md +247 -65
- package/docs/de/releases/v6.md +298 -0
- package/docs/de/roadmap.md +1 -3
- package/docs/de/vs_code_extension.md +89 -58
- package/docs/en/configuration.md +9 -2
- package/docs/en/intlayer_CMS.md +205 -23
- package/docs/en/intlayer_cli.md +4 -4
- package/docs/en/intlayer_visual_editor.md +7 -6
- package/docs/en/intlayer_with_nextjs_14.md +17 -1
- package/docs/en/intlayer_with_nextjs_15.md +17 -1
- package/docs/en/releases/v6.md +268 -0
- package/docs/en/roadmap.md +1 -3
- package/docs/en/vs_code_extension.md +79 -49
- package/docs/en-GB/intlayer_CMS.md +216 -52
- package/docs/en-GB/releases/v6.md +297 -0
- package/docs/en-GB/roadmap.md +1 -3
- package/docs/en-GB/vs_code_extension.md +79 -48
- package/docs/es/intlayer_CMS.md +257 -84
- package/docs/es/releases/v6.md +274 -0
- package/docs/es/roadmap.md +1 -3
- package/docs/es/vs_code_extension.md +90 -60
- package/docs/fr/intlayer_CMS.md +250 -68
- package/docs/fr/releases/v6.md +274 -0
- package/docs/fr/roadmap.md +1 -3
- package/docs/fr/vs_code_extension.md +94 -63
- package/docs/hi/intlayer_CMS.md +253 -77
- package/docs/hi/releases/v6.md +273 -0
- package/docs/hi/roadmap.md +1 -3
- package/docs/hi/vs_code_extension.md +92 -61
- package/docs/it/intlayer_CMS.md +251 -73
- package/docs/it/releases/v6.md +273 -0
- package/docs/it/roadmap.md +1 -3
- package/docs/it/vs_code_extension.md +94 -63
- package/docs/ja/intlayer_CMS.md +282 -97
- package/docs/ja/releases/v6.md +273 -0
- package/docs/ja/roadmap.md +1 -3
- package/docs/ja/vs_code_extension.md +99 -68
- package/docs/ko/intlayer_CMS.md +267 -93
- package/docs/ko/releases/v6.md +273 -0
- package/docs/ko/roadmap.md +1 -3
- package/docs/ko/vs_code_extension.md +88 -57
- package/docs/pt/intlayer_CMS.md +261 -83
- package/docs/pt/releases/v6.md +273 -0
- package/docs/pt/roadmap.md +1 -3
- package/docs/pt/vs_code_extension.md +89 -58
- package/docs/ru/intlayer_CMS.md +240 -65
- package/docs/ru/releases/v6.md +274 -0
- package/docs/ru/roadmap.md +1 -1
- package/docs/ru/vs_code_extension.md +83 -52
- package/docs/tr/intlayer_CMS.md +278 -96
- package/docs/tr/intlayer_with_nextjs_page_router.md +1 -1
- package/docs/tr/intlayer_with_tanstack.md +3 -0
- package/docs/tr/releases/v6.md +273 -0
- package/docs/tr/roadmap.md +1 -1
- package/docs/tr/vs_code_extension.md +100 -71
- package/docs/zh/intlayer_CMS.md +257 -76
- package/docs/zh/releases/v6.md +273 -0
- package/docs/zh/roadmap.md +1 -3
- package/docs/zh/vs_code_extension.md +99 -68
- package/package.json +9 -8
- package/src/blog.ts +1 -1
- package/src/common.ts +2 -6
- package/src/generated/blog.entry.ts +323 -1864
- package/src/generated/docs.entry.ts +1317 -6278
- package/src/generated/frequentQuestions.entry.ts +202 -1183
- package/src/generated/legal.entry.ts +48 -85
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
createdAt:
|
|
3
|
-
updatedAt: 2025-
|
|
4
|
-
title: Intlayer CMS |
|
|
5
|
-
description:
|
|
2
|
+
createdAt: 2025-08-23
|
|
3
|
+
updatedAt: 2025-08-23
|
|
4
|
+
title: Intlayer CMS | Externalise your content into the Intlayer CMS
|
|
5
|
+
description: Externalise your content into the Intlayer CMS to delegate the management of your content to your team.
|
|
6
6
|
keywords:
|
|
7
7
|
- CMS
|
|
8
8
|
- Visual Editor
|
|
9
|
-
-
|
|
9
|
+
- Internationalisation
|
|
10
10
|
- Documentation
|
|
11
11
|
- Intlayer
|
|
12
12
|
- Next.js
|
|
@@ -23,27 +23,15 @@ youtubeVideo: https://www.youtube.com/watch?v=UDDTnirwi_4
|
|
|
23
23
|
|
|
24
24
|
<iframe title="Visual Editor + CMS for Your Web App: Intlayer Explained" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/UDDTnirwi_4?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
25
25
|
|
|
26
|
-
The Intlayer CMS is an application that allows you to externalise
|
|
26
|
+
The Intlayer CMS is an application that allows you to externalise the content of an Intlayer project.
|
|
27
27
|
|
|
28
|
-
For
|
|
28
|
+
For this, Intlayer introduces the concept of 'distant dictionaries'.
|
|
29
29
|
|
|
30
30
|

|
|
31
31
|
|
|
32
32
|
## Understanding distant dictionaries
|
|
33
33
|
|
|
34
|
-
Intlayer
|
|
35
|
-
|
|
36
|
-
<iframe title="Visual Editor + CMS for Your Web App: Intlayer Explained" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/UDDTnirwi_4?autoplay=0&origin=http://intlayer.org&controls=0&rel=1"/>
|
|
37
|
-
|
|
38
|
-
The Intlayer CMS is an application that allows you to externalise your content from an Intlayer project.
|
|
39
|
-
|
|
40
|
-
For that, Intlayer introduces the concept of 'distant dictionaries'.
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
## Understanding distant dictionaries
|
|
45
|
-
|
|
46
|
-
Intlayer makes a difference between 'local' and 'distant' dictionaries.
|
|
34
|
+
Intlayer distinguishes between 'local' and 'distant' dictionaries.
|
|
47
35
|
|
|
48
36
|
- A 'local' dictionary is a dictionary that is declared in your Intlayer project. Such as the declaration file of a button, or your navigation bar. Externalising your content does not make sense in this case because this content is not supposed to change often.
|
|
49
37
|
|
|
@@ -51,9 +39,9 @@ Intlayer makes a difference between 'local' and 'distant' dictionaries.
|
|
|
51
39
|
|
|
52
40
|
## Visual editor vs CMS
|
|
53
41
|
|
|
54
|
-
The [Intlayer Visual](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) editor is a tool that allows you to manage your content in a visual editor for local dictionaries. Once a change is made, the content will be replaced in the code-base.
|
|
42
|
+
The [Intlayer Visual](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_visual_editor.md) editor is a tool that allows you to manage your content in a visual editor for local dictionaries. Once a change is made, the content will be replaced in the code-base. This means that the application will be rebuilt and the page will be reloaded to display the new content.
|
|
55
43
|
|
|
56
|
-
In contrast, the Intlayer CMS is a tool that allows you to manage your content in a visual editor for distant dictionaries. Once a change is made, the content will **not** impact your code-base.
|
|
44
|
+
In contrast, the Intlayer CMS is a tool that allows you to manage your content in a visual editor for distant dictionaries. Once a change is made, the content will **not** impact your code-base. The website will automatically display the updated content.
|
|
57
45
|
|
|
58
46
|
## Integrating
|
|
59
47
|
|
|
@@ -116,7 +104,7 @@ const config: IntlayerConfig = {
|
|
|
116
104
|
*
|
|
117
105
|
* In the case you are self-hosting the Intlayer CMS, you can set the URL of the backend.
|
|
118
106
|
*
|
|
119
|
-
* The URL of the Intlayer
|
|
107
|
+
* The URL of the Intlayer CMS.
|
|
120
108
|
* By default, it is set to https://back.intlayer.org
|
|
121
109
|
*/
|
|
122
110
|
backendURL: process.env.INTLAYER_BACKEND_URL,
|
|
@@ -164,7 +152,7 @@ const config = {
|
|
|
164
152
|
/**
|
|
165
153
|
* Optional
|
|
166
154
|
*
|
|
167
|
-
* In case you are self-hosting the Intlayer CMS, you can set the URL of the backend.
|
|
155
|
+
* In the case you are self-hosting the Intlayer CMS, you can set the URL of the backend.
|
|
168
156
|
*
|
|
169
157
|
* The URL of the Intlayer backend.
|
|
170
158
|
* By default, it is set to https://back.intlayer.org
|
|
@@ -208,14 +196,15 @@ const config = {
|
|
|
208
196
|
*
|
|
209
197
|
* The URL of the Intlayer CMS.
|
|
210
198
|
* By default, it is set to https://intlayer.org
|
|
199
|
+
*/
|
|
211
200
|
cmsURL: process.env.INTLAYER_CMS_URL,
|
|
212
201
|
|
|
213
202
|
/**
|
|
214
203
|
* Optional
|
|
215
204
|
*
|
|
216
|
-
*
|
|
205
|
+
* If you are self-hosting the Intlayer CMS, you can set the URL of the backend.
|
|
217
206
|
*
|
|
218
|
-
* The URL of the Intlayer CMS.
|
|
207
|
+
* The URL of the Intlayer CMS backend.
|
|
219
208
|
* By default, it is set to https://back.intlayer.org
|
|
220
209
|
*/
|
|
221
210
|
backendURL: process.env.INTLAYER_BACKEND_URL,
|
|
@@ -225,7 +214,7 @@ const config = {
|
|
|
225
214
|
module.exports = config;
|
|
226
215
|
```
|
|
227
216
|
|
|
228
|
-
> If you
|
|
217
|
+
> If you do not have a client ID and client secret, you can obtain them by creating a new client in the [Intlayer Dashboard - Projects](https://intlayer.org/dashboard/projects).
|
|
229
218
|
|
|
230
219
|
> To see all available parameters, refer to the [configuration documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/configuration.md).
|
|
231
220
|
|
|
@@ -265,14 +254,15 @@ This command uploads your initial content dictionaries, making them available fo
|
|
|
265
254
|
|
|
266
255
|
### Edit the dictionary
|
|
267
256
|
|
|
268
|
-
|
|
257
|
+
You will then be able to view and manage your dictionary in the [Intlayer CMS](https://intlayer.org/dashboard/content).
|
|
258
|
+
|
|
259
|
+
## Live sync
|
|
269
260
|
|
|
270
|
-
|
|
261
|
+
Live Sync allows your app to reflect CMS content changes at runtime. No rebuild or redeploy is required. When enabled, updates are streamed to a Live Sync server that refreshes the dictionaries your application reads.
|
|
271
262
|
|
|
272
|
-
|
|
263
|
+
> Live Sync requires a continuous server connection and is available on the enterprise plan.
|
|
273
264
|
|
|
274
|
-
|
|
275
|
-
By activating the [`liveSync`](https://intlayer.org/doc/concept/configuration#editor-configuration) configuration, the application will automatically replace the updated content when it is detected.
|
|
265
|
+
Enable Live Sync by updating your Intlayer configuration:
|
|
276
266
|
|
|
277
267
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
278
268
|
import type { IntlayerConfig } from "intlayer";
|
|
@@ -280,18 +270,32 @@ import type { IntlayerConfig } from "intlayer";
|
|
|
280
270
|
const config: IntlayerConfig = {
|
|
281
271
|
// ... other configuration settings
|
|
282
272
|
editor: {
|
|
283
|
-
// ... other configuration settings
|
|
284
|
-
|
|
285
273
|
/**
|
|
286
|
-
*
|
|
287
|
-
* For example, when a
|
|
274
|
+
* Enables hot reloading of locale configurations when changes are detected.
|
|
275
|
+
* For example, when a dictionary is added or updated, the application updates
|
|
276
|
+
* the content displayed on the page.
|
|
288
277
|
*
|
|
289
|
-
* Because
|
|
278
|
+
* Because hot reloading requires a continuous connection to the server, it is
|
|
279
|
+
* only available for clients of the `enterprise` plan.
|
|
290
280
|
*
|
|
291
281
|
* Default: false
|
|
292
282
|
*/
|
|
293
283
|
liveSync: true,
|
|
294
284
|
},
|
|
285
|
+
build: {
|
|
286
|
+
/**
|
|
287
|
+
* Controls how dictionaries are imported:
|
|
288
|
+
*
|
|
289
|
+
* - "live": Dictionaries are fetched dynamically using the Live Sync API.
|
|
290
|
+
* Replaces useIntlayer with useDictionaryDynamic.
|
|
291
|
+
*
|
|
292
|
+
* Note: Live mode uses the Live Sync API to fetch dictionaries. If the API call
|
|
293
|
+
* fails, dictionaries are imported dynamically.
|
|
294
|
+
* Note: Only dictionaries with remote content and "live" flags use live mode.
|
|
295
|
+
* Others use dynamic mode for performance.
|
|
296
|
+
*/
|
|
297
|
+
importMode: "live",
|
|
298
|
+
},
|
|
295
299
|
};
|
|
296
300
|
|
|
297
301
|
export default config;
|
|
@@ -302,18 +306,32 @@ export default config;
|
|
|
302
306
|
const config = {
|
|
303
307
|
// ... other configuration settings
|
|
304
308
|
editor: {
|
|
305
|
-
// ... other configuration settings
|
|
306
|
-
|
|
307
309
|
/**
|
|
308
|
-
*
|
|
309
|
-
* For example, when a
|
|
310
|
+
* Enables hot reloading of locale configurations when changes are detected.
|
|
311
|
+
* For example, when a dictionary is added or updated, the application updates
|
|
312
|
+
* the content displayed on the page.
|
|
310
313
|
*
|
|
311
|
-
* Because
|
|
314
|
+
* Because hot reloading requires a continuous connection to the server, it is
|
|
315
|
+
* only available for clients of the `enterprise` plan.
|
|
312
316
|
*
|
|
313
317
|
* Default: false
|
|
314
318
|
*/
|
|
315
319
|
liveSync: true,
|
|
316
320
|
},
|
|
321
|
+
build: {
|
|
322
|
+
/**
|
|
323
|
+
* Controls how dictionaries are imported:
|
|
324
|
+
*
|
|
325
|
+
* - "live": Dictionaries are fetched dynamically using the Live Sync API.
|
|
326
|
+
* Replaces useIntlayer with useDictionaryDynamic.
|
|
327
|
+
*
|
|
328
|
+
* Note: Live mode uses the Live Sync API to fetch dictionaries. If the API call
|
|
329
|
+
* fails, dictionaries are imported dynamically.
|
|
330
|
+
* Note: Only dictionaries with remote content and "live" flags use live mode.
|
|
331
|
+
* Others use dynamic mode for performance.
|
|
332
|
+
*/
|
|
333
|
+
importMode: "live",
|
|
334
|
+
},
|
|
317
335
|
};
|
|
318
336
|
|
|
319
337
|
export default config;
|
|
@@ -324,28 +342,169 @@ export default config;
|
|
|
324
342
|
const config = {
|
|
325
343
|
// ... other configuration settings
|
|
326
344
|
editor: {
|
|
327
|
-
// ... other configuration settings
|
|
328
|
-
|
|
329
345
|
/**
|
|
330
|
-
*
|
|
331
|
-
* For example, when a
|
|
346
|
+
* Enables hot reloading of locale configurations when changes are detected.
|
|
347
|
+
* For example, when a dictionary is added or updated, the application updates
|
|
348
|
+
* the content displayed on the page.
|
|
332
349
|
*
|
|
333
|
-
* Because
|
|
350
|
+
* Because hot reloading requires a continuous connection to the server, it is
|
|
351
|
+
* only available for clients of the `enterprise` plan.
|
|
334
352
|
*
|
|
335
353
|
* Default: false
|
|
336
354
|
*/
|
|
337
355
|
liveSync: true,
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* The port of the Live Sync server.
|
|
359
|
+
*
|
|
360
|
+
* Default: 4000
|
|
361
|
+
*/
|
|
362
|
+
liveSyncPort: 4000,
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* The URL of the Live Sync server.
|
|
366
|
+
*
|
|
367
|
+
* Default: http://localhost:{liveSyncPort}
|
|
368
|
+
*/
|
|
369
|
+
liveSyncURL: "https://live.example.com",
|
|
370
|
+
},
|
|
371
|
+
build: {
|
|
372
|
+
/**
|
|
373
|
+
* Controls how dictionaries are imported:
|
|
374
|
+
*
|
|
375
|
+
* - "live": Dictionaries are fetched dynamically using the Live Sync API.
|
|
376
|
+
* Replaces useIntlayer with useDictionaryDynamic.
|
|
377
|
+
*
|
|
378
|
+
* Note: Live mode uses the Live Sync API to fetch dictionaries. If the API call
|
|
379
|
+
* fails, dictionaries are imported dynamically.
|
|
380
|
+
* Note: Only dictionaries with remote content and "live" flags use live mode.
|
|
381
|
+
* Others use dynamic mode for performance.
|
|
382
|
+
*/
|
|
383
|
+
importMode: "live",
|
|
338
384
|
},
|
|
339
385
|
};
|
|
340
386
|
|
|
341
387
|
module.exports = config;
|
|
342
388
|
```
|
|
343
389
|
|
|
344
|
-
|
|
390
|
+
Start the Live Sync server to wrap your application:
|
|
391
|
+
|
|
392
|
+
Example using Next.js:
|
|
393
|
+
|
|
394
|
+
```json5 fileName="package.json"
|
|
395
|
+
{
|
|
396
|
+
"scripts": {
|
|
397
|
+
// ... other scripts
|
|
398
|
+
"build": "next build",
|
|
399
|
+
"dev": "next dev",
|
|
400
|
+
"start": "npx intlayer live --process 'next start'",
|
|
401
|
+
},
|
|
402
|
+
}
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Example using Vite:
|
|
406
|
+
|
|
407
|
+
```json5 fileName="package.json"
|
|
408
|
+
{
|
|
409
|
+
"scripts": {
|
|
410
|
+
// ... other scripts
|
|
411
|
+
"build": "vite build",
|
|
412
|
+
"dev": "vite dev",
|
|
413
|
+
"start": "npx intlayer live --process 'vite start'",
|
|
414
|
+
},
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
The Live Sync server wraps your application and automatically applies updated content as it arrives.
|
|
419
|
+
|
|
420
|
+
To receive change notifications from the CMS, the Live Sync server maintains an SSE connection to the backend. When content changes in the CMS, the backend forwards the update to the Live Sync server, which writes the new dictionaries. Your application will reflect the update on the next navigation or browser reload—no rebuild required.
|
|
345
421
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
422
|
+
Flow chart (CMS/Backend -> Live Sync Server -> Application Server -> Frontend):
|
|
423
|
+
|
|
424
|
+

|
|
425
|
+
|
|
426
|
+
How it works:
|
|
427
|
+
|
|
428
|
+

|
|
429
|
+
|
|
430
|
+
### Development workflow (local)
|
|
431
|
+
|
|
432
|
+
- In development, all remote dictionaries are fetched when the application starts, so you can test updates quickly.
|
|
433
|
+
- To test Live Sync locally with Next.js, wrap your dev server:
|
|
434
|
+
|
|
435
|
+
```json5 fileName="package.json"
|
|
436
|
+
{
|
|
437
|
+
"scripts": {
|
|
438
|
+
// ... other scripts
|
|
439
|
+
"dev": "npx intlayer live --process 'next dev'",
|
|
440
|
+
// "dev": "npx intlayer live --process 'vite dev'", // For Vite
|
|
441
|
+
},
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Enable optimisation so Intlayer applies the Live import transformations during development:
|
|
446
|
+
|
|
447
|
+
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
448
|
+
import type { IntlayerConfig } from "intlayer";
|
|
449
|
+
|
|
450
|
+
const config: IntlayerConfig = {
|
|
451
|
+
editor: {
|
|
452
|
+
applicationURL: "http://localhost:5173",
|
|
453
|
+
liveSyncURL: "http://localhost:4000",
|
|
454
|
+
liveSync: true,
|
|
455
|
+
},
|
|
456
|
+
build: {
|
|
457
|
+
optimize: true,
|
|
458
|
+
importMode: "live",
|
|
459
|
+
},
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
export default config;
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
```javascript fileName="intlayer.config.mjs" codeFormat="esm"
|
|
466
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
467
|
+
const config = {
|
|
468
|
+
editor: {
|
|
469
|
+
applicationURL: "http://localhost:5173",
|
|
470
|
+
liveSyncURL: "http://localhost:4000",
|
|
471
|
+
liveSync: true,
|
|
472
|
+
},
|
|
473
|
+
build: {
|
|
474
|
+
optimise: true,
|
|
475
|
+
importMode: "live",
|
|
476
|
+
},
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export default config;
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
```javascript fileName="intlayer.config.cjs" codeFormat="commonjs"
|
|
483
|
+
/** @type {import('intlayer').IntlayerConfig} */
|
|
484
|
+
const config = {
|
|
485
|
+
editor: {
|
|
486
|
+
applicationURL: "http://localhost:5173",
|
|
487
|
+
liveSyncURL: "http://localhost:4000",
|
|
488
|
+
liveSync: true,
|
|
489
|
+
},
|
|
490
|
+
build: {
|
|
491
|
+
optimise: true,
|
|
492
|
+
importMode: "live",
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
module.exports = config;
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
This setup wraps your dev server with the Live Sync server, fetches remote dictionaries at startup, and streams updates from the CMS via SSE. Refresh the page to see changes.
|
|
500
|
+
|
|
501
|
+
Notes and constraints:
|
|
502
|
+
|
|
503
|
+
- Add the live sync origin to your site security policy (CSP). Ensure the live sync URL is allowed in `connect-src` (and `frame-ancestors` if relevant).
|
|
504
|
+
- Live Sync does not work with static output. For Next.js, the page must be dynamic to receive updates at runtime (e.g., use `generateStaticParams`, `generateMetadata`, `getServerSideProps`, or `getStaticProps` appropriately to avoid full static-only constraints).
|
|
505
|
+
- In the CMS, each dictionary has a `live` flag. Only dictionaries with `live=true` are fetched via the live sync API; others are imported dynamically and remain unchanged at runtime.
|
|
506
|
+
- The `live` flag is evaluated for each dictionary at build time. If remote content was not flagged `live=true` during build, you must rebuild to enable Live Sync for that dictionary.
|
|
507
|
+
- The live sync server must be able to write to `.intlayer`. In containers, ensure write access to `/.intlayer`.
|
|
349
508
|
|
|
350
509
|
## Debug
|
|
351
510
|
|
|
@@ -359,8 +518,13 @@ If you encounter any issues with the CMS, check the following:
|
|
|
359
518
|
- The CMS URL
|
|
360
519
|
|
|
361
520
|
- Ensure that the project configuration was pushed to the Intlayer CMS.
|
|
521
|
+
|
|
362
522
|
- The visual editor uses an iframe to display your website. Ensure that the Content Security Policy (CSP) of your website allows the CMS URL as `frame-ancestors` ('https://intlayer.org' by default). Check the editor console for any errors.
|
|
363
523
|
|
|
364
524
|
## Doc History
|
|
365
525
|
|
|
366
|
-
|
|
526
|
+
| Version | Date | Changes |
|
|
527
|
+
| ------- | ---------- | ----------------------------------------- |
|
|
528
|
+
| 6.0.1 | 2025-09-22 | Add live sync documentation |
|
|
529
|
+
| 6.0.0 | 2025-09-04 | Replace `hotReload` field with `liveSync` |
|
|
530
|
+
| 5.5.10 | 2025-06-29 | Initialise history |
|