Skip to content

Commit d41907a

Browse files
committed
Add comments to prevent manual edition of generated doc
1 parent 002e559 commit d41907a

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

content/collections/reference/metadata.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ This reference documentation details all available metadata fields that can be s
1010

1111
The examples given throughout this reference can be seen in context in the [complete metadata file](https://github.com/OpenTermsArchive/demo-declarations/blob/main/metadata.yml) and rendered in the [collection page](https://opentermsarchive.org/en/collections/demo/) of the Demo collection.
1212

13-
13+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THE FOLLOWING SECTION MANUALLY -->
1414
## Fields
1515

16+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
1617
{{< refItem
1718
name="id"
1819
type="string"
@@ -21,6 +22,7 @@ The examples given throughout this reference can be seen in context in the [comp
2122
required=true
2223
/>}}
2324

25+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
2426
{{< refItem
2527
name="name"
2628
type="string"
@@ -29,6 +31,7 @@ The examples given throughout this reference can be seen in context in the [comp
2931
required=true
3032
/>}}
3133

34+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
3235
{{< refItem
3336
name="tagline"
3437
type="string"
@@ -37,6 +40,7 @@ The examples given throughout this reference can be seen in context in the [comp
3740
required=true
3841
/>}}
3942

43+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
4044
{{< refItem
4145
name="languages"
4246
type="array of strings"
@@ -45,6 +49,7 @@ The examples given throughout this reference can be seen in context in the [comp
4549
required=true
4650
/>}}
4751

52+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
4853
{{< refItem
4954
name="jurisdictions"
5055
type="array of strings"
@@ -53,6 +58,7 @@ The examples given throughout this reference can be seen in context in the [comp
5358
required=true
5459
/>}}
5560

61+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
5662
{{< refItem
5763
name="description"
5864
type="string"
@@ -67,6 +73,7 @@ This provides a reference collection for best practices and enables the Open Ter
6773
```
6874
{{< /refItem >}}
6975

76+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
7077
{{< refItem
7178
name="dataset"
7279
type="uri"
@@ -75,6 +82,7 @@ This provides a reference collection for best practices and enables the Open Ter
7582
required=false
7683
/>}}
7784

85+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
7886
{{< refItem
7987
name="declarations"
8088
type="uri"
@@ -83,6 +91,7 @@ This provides a reference collection for best practices and enables the Open Ter
8391
required=false
8492
/>}}
8593

94+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
8695
{{< refItem
8796
name="versions"
8897
type="uri"
@@ -91,6 +100,7 @@ This provides a reference collection for best practices and enables the Open Ter
91100
required=false
92101
/>}}
93102

103+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
94104
{{< refItem
95105
name="snapshots"
96106
type="uri"
@@ -99,6 +109,7 @@ This provides a reference collection for best practices and enables the Open Ter
99109
required=false
100110
/>}}
101111

112+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
102113
{{< refItem
103114
name="donations"
104115
type="uri"
@@ -107,6 +118,7 @@ This provides a reference collection for best practices and enables the Open Ter
107118
required=false
108119
/>}}
109120

121+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
110122
{{< refItem
111123
name="logo"
112124
type="uri"
@@ -115,20 +127,23 @@ This provides a reference collection for best practices and enables the Open Ter
115127
required=false
116128
/>}}
117129

130+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
118131
{{< refItem
119132
name="trackingPeriods"
120133
type="array of objects"
121134
description="List of time periods during which terms were tracked, with their tracking configuration. Gaps between periods indicate times when tracking was interrupted. See [TrackingPeriods]({{< relref \"#trackingperiods\" >}}) section."
122135
required=false
123136
/>}}
124137

138+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
125139
{{< refItem
126140
name="governance"
127141
type="object of objects"
128142
description="Map of organizations involved in the collection's governance, with organization names as keys and governance objects as values. See [Governance]({{< relref \"#governance\" >}}) section."
129143
required=false
130144
/>}}
131145

146+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
132147
{{< refItem
133148
name="i18n"
134149
type="object of objects"
@@ -151,6 +166,7 @@ fr:
151166

152167
### TrackingPeriods
153168

169+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
154170
{{< refItem
155171
name="startDate"
156172
type="date"
@@ -159,6 +175,7 @@ fr:
159175
required=true
160176
/>}}
161177

178+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
162179
{{< refItem
163180
name="schedule"
164181
type="cron-expression"
@@ -167,6 +184,7 @@ fr:
167184
required=true
168185
/>}}
169186

187+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
170188
{{< refItem
171189
name="serverLocation"
172190
type="string"
@@ -175,6 +193,7 @@ fr:
175193
required=true
176194
/>}}
177195

196+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
178197
{{< refItem
179198
name="endDate"
180199
type="date"
@@ -188,6 +207,7 @@ fr:
188207

189208
### Governance
190209

210+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
191211
{{< refItem
192212
name="url"
193213
type="uri"
@@ -196,6 +216,7 @@ fr:
196216
required=false
197217
/>}}
198218

219+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
199220
{{< refItem
200221
name="logo"
201222
type="uri"
@@ -204,6 +225,7 @@ fr:
204225
required=false
205226
/>}}
206227

228+
<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
207229
{{< refItem
208230
name="roles"
209231
type="array of strings"

scripts/generate-metadata-reference.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ function generateConfigOption(propertyName, propertyData, requiredProperties, in
8383
if (hasMultilineExample) {
8484
const multilineExample = propertyData.example.replace(/\\n/g, '\n');
8585

86-
return `${indent}{{< refItem
86+
return `<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
87+
${indent}{{< refItem
8788
${indent} name="${propertyName.replace(/"/g, '\\"')}"
8889
${indent} type="${propertyType}"
8990
${indent} description="${description.replace(/"/g, '\\"')}"
@@ -96,7 +97,8 @@ ${indent}{{< /refItem >}}
9697
`;
9798
}
9899

99-
return `${indent}{{< refItem
100+
return `<!-- GENERATED DOCUMENTATION DO NOT EDIT THIS MANUALLY -->
101+
${indent}{{< refItem
100102
${indent} name="${propertyName.replace(/"/g, '\\"')}"
101103
${indent} type="${propertyType}"
102104
${indent} description="${description.replace(/"/g, '\\"')}"

0 commit comments

Comments
 (0)