@paroicms/site-generator-plugin 0.5.0 → 0.5.1
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.
|
@@ -20,7 +20,7 @@ Here is an example of an object for describing a custom **HTML** field type:
|
|
|
20
20
|
|
|
21
21
|
<field_type_example>
|
|
22
22
|
{{
|
|
23
|
-
"name": "
|
|
23
|
+
"name": "myCustomField",
|
|
24
24
|
"localized": true,
|
|
25
25
|
"storedAs": "text",
|
|
26
26
|
"dataType": "quillDelta",
|
|
@@ -35,11 +35,11 @@ Then, in the locales, the translations of custom field types must be in a sub-ke
|
|
|
35
35
|
{{
|
|
36
36
|
"nodeTypes": {{
|
|
37
37
|
...
|
|
38
|
-
"
|
|
38
|
+
"myNodeTypeName": {{
|
|
39
39
|
...
|
|
40
40
|
"fields": {{
|
|
41
|
-
"
|
|
42
|
-
"label": "My
|
|
41
|
+
"myCustomField": {{
|
|
42
|
+
"label": "My custom field",
|
|
43
43
|
"description": "This is a description that will be displayed in a tooltip of the back-office"
|
|
44
44
|
}}
|
|
45
45
|
}}
|
|
@@ -48,10 +48,29 @@ Then, in the locales, the translations of custom field types must be in a sub-ke
|
|
|
48
48
|
}}
|
|
49
49
|
</l10n_example>
|
|
50
50
|
|
|
51
|
+
Here is how to write field locales for a custom site field:
|
|
52
|
+
|
|
53
|
+
<l10n_example>
|
|
54
|
+
{{
|
|
55
|
+
"nodeTypes": {{
|
|
56
|
+
...
|
|
57
|
+
"_site": {{
|
|
58
|
+
"fields": {{
|
|
59
|
+
"myCustomSiteField": {{
|
|
60
|
+
"label": "My custom site field",
|
|
61
|
+
"description": "…"
|
|
62
|
+
}}
|
|
63
|
+
}}
|
|
64
|
+
}}
|
|
65
|
+
}}
|
|
66
|
+
}}
|
|
67
|
+
</l10n_example>
|
|
68
|
+
|
|
51
69
|
Important:
|
|
52
70
|
|
|
53
71
|
- Never add locales for a predefined field.
|
|
54
72
|
- Never add an unknown predefined field.
|
|
73
|
+
- The type name of the "site" node type is omitted from the JSON but its value is always `_site`.
|
|
55
74
|
|
|
56
75
|
# 3. Examine the current JSON data, which conforms to the `JtSiteSchema` type:
|
|
57
76
|
|