Skip to content

Commit da8db53

Browse files
committed
Remove formating from value
1 parent 5ac9fb1 commit da8db53

File tree

4 files changed

+68
-57
lines changed

4 files changed

+68
-57
lines changed

content/api/cli.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,50 @@ In these commands:
1414

1515
## Tracking terms
1616

17-
{{< configOption name="ota track" description="Track the current terms of services according to provided declarations. The declarations, snapshots and versions paths are defined in the configuration." example="`npx ota track`" />}}
17+
{{< configOption name="ota track" description="Track the current terms of services according to provided declarations. The declarations, snapshots and versions paths are defined in the configuration." example="npx ota track" />}}
1818

1919
> Note that the snapshots and versions will be recorded at the moment the command is executed, on top of the existing local history. If a shared history already exists and the goal is to add on top of it, that history has to be downloaded before executing that command.
2020
21-
{{< configOption name="ota track --help" description="Show help and available options for track command" example="`npx ota track --help`" />}}
21+
{{< configOption name="ota track --help" description="Show help and available options for track command" example="npx ota track --help" />}}
2222

23-
{{< configOption name="ota track [--services <service_id>...]" description="Track terms of specific services only" example="`npx ota track --services \"Facebook\" \"LinkedIn\"`" />}}
23+
{{< configOption name="ota track [--services <service_id>...]" description="Track terms of specific services only" example="npx ota track --services \"Facebook\" \"LinkedIn\"" />}}
2424

25-
{{< configOption name="ota track [--services <service_id>...] [--types <terms_type>...]" description="Track specific terms types of specific services only" example="`npx ota track --services \"Facebook\" \"LinkedIn\" --types \"Privacy Policy\" \"Terms of Service\"`" />}}
25+
{{< configOption name="ota track [--services <service_id>...] [--types <terms_type>...]" description="Track specific terms types of specific services only" example="npx ota track --services \"Facebook\" \"LinkedIn\" --types \"Privacy Policy\" \"Terms of Service\"" />}}
2626

27-
{{< configOption name="ota track --schedule [--services <service_id>...] [--types <terms_type>...]" description="Track terms on the schedule defined in the configuration" example="`npx ota track --schedule`" />}}
27+
{{< configOption name="ota track --schedule [--services <service_id>...] [--types <terms_type>...]" description="Track terms on the schedule defined in the configuration" example="npx ota track --schedule" />}}
2828

2929
## Validating declarations
3030

31-
{{< configOption name="ota validate [--services <service_id>...] [--types <terms_type>...]" description="Check that all declarations allow recording a snapshot and a version properly. If service IDs are provided, check only those services." example="`npx ota validate --services \"Facebook\" \"LinkedIn\" --types \"Privacy Policy\" \"Terms of Service\"`" />}}
31+
{{< configOption name="ota validate [--services <service_id>...] [--types <terms_type>...]" description="Check that all declarations allow recording a snapshot and a version properly. If service IDs are provided, check only those services." example="npx ota validate --services \"Facebook\" \"LinkedIn\" --types \"Privacy Policy\" \"Terms of Service\"" />}}
3232

33-
{{< configOption name="ota validate --schema-only [--services <service_id>...] [--types <terms_type>...]" description="Check that all declarations are readable by the engine. Allows for a much faster check of declarations, but does not check that the terms are actually accessible." example="`npx ota validate --schema-only --services \"Facebook\" \"LinkedIn\" --types \"Privacy Policy\" \"Terms of Service\"`" />}}
33+
{{< configOption name="ota validate --schema-only [--services <service_id>...] [--types <terms_type>...]" description="Check that all declarations are readable by the engine. Allows for a much faster check of declarations, but does not check that the terms are actually accessible." example="npx ota validate --schema-only --services \"Facebook\" \"LinkedIn\" --types \"Privacy Policy\" \"Terms of Service\"" />}}
3434

35-
{{< configOption name="ota validate --modified" description="Run ota validate only on files that have been modified in Git" example="`npx ota validate --modified`" />}}
35+
{{< configOption name="ota validate --modified" description="Run ota validate only on files that have been modified in Git" example="npx ota validate --modified" />}}
3636

3737
## Linting declarations
3838

39-
{{< configOption name="ota lint [--services <service_id>...]" description="Test the format of declarations' normalisation." example="`npx ota lint --services \"Facebook\" \"LinkedIn\"`" />}}
39+
{{< configOption name="ota lint [--services <service_id>...]" description="Test the format of declarations' normalisation." example="npx ota lint --services \"Facebook\" \"LinkedIn\"" />}}
4040

41-
{{< configOption name="ota lint --fix [--services <service_id>...]" description="Automatically correct formatting mistakes and ensure that all declarations are standardised" example="`npx ota lint --fix`" />}}
41+
{{< configOption name="ota lint --fix [--services <service_id>...]" description="Automatically correct formatting mistakes and ensure that all declarations are standardised" example="npx ota lint --fix" />}}
4242

43-
{{< configOption name="ota lint --modified" description="Run ota lint only on files that have been modified in Git" example="`npx ota lint --modified`" />}}
43+
{{< configOption name="ota lint --modified" description="Run ota lint only on files that have been modified in Git" example="npx ota lint --modified" />}}
4444

4545
## Publishing dataset
4646

47-
{{< configOption name="ota dataset [--file <filename>]" description="Export the versions dataset into a ZIP file and publish it to GitHub releases. The dataset title and the URL of the versions repository are defined in the configuration." example="`npx ota dataset --file dataset.zip`" />}}
47+
{{< configOption name="ota dataset [--file <filename>]" description="Export the versions dataset into a ZIP file and publish it to GitHub releases. The dataset title and the URL of the versions repository are defined in the configuration." example="npx ota dataset --file dataset.zip" />}}
4848

4949
To export the dataset into a ZIP file and publish it on GitHub releases:
5050

51-
{{< configOption name="ota dataset --publish [--file <filename>]" description="Export and publish dataset to GitHub releases" example="`GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --publish`" />}}
51+
{{< configOption name="ota dataset --publish [--file <filename>]" description="Export and publish dataset to GitHub releases" example="GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --publish" />}}
5252

5353
The `GITHUB_TOKEN` can also be defined in a [`.env` file]({{< relref "collections/references/environment-variables" >}}).
5454

5555
To export, publish the dataset and remove the local copy that was created after it has been uploaded:
5656

57-
{{< configOption name="ota dataset --publish --remove-local-copy [--file <filename>]" description="Export, publish dataset and remove local copy after upload" example="`GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --publish --remove-local-copy`" />}}
57+
{{< configOption name="ota dataset --publish --remove-local-copy [--file <filename>]" description="Export, publish dataset and remove local copy after upload" example="GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --publish --remove-local-copy" />}}
5858

59-
{{< configOption name="ota dataset --schedule [--file <filename>]" description="Schedule export, publishing and local copy removal" example="`GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --schedule --publish --remove-local-copy`" />}}
59+
{{< configOption name="ota dataset --schedule [--file <filename>]" description="Schedule export, publishing and local copy removal" example="GITHUB_TOKEN=ghp_XXXXXXXXX npx ota dataset --schedule --publish --remove-local-copy" />}}
6060

6161
## Exposing the collection API
6262

63-
{{< configOption name="ota serve" description="Start the collection Web API server. The Web API will be available under `<http://localhost>:<port>/<basePath>/<apiVersion>/<resource>`. The server port and base path are defined in the configuration." example="`npx ota serve`" />}}
63+
{{< configOption name="ota serve" description="Start the collection Web API server. The Web API will be available under `<http://localhost>:<port>/<basePath>/<apiVersion>/<resource>`. The server port and base path are defined in the configuration." example="npx ota serve" />}}

content/collections/references/configuration.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ As an example, see the [production configuration file](https://github.com/OpenTe
1414
{{< configOption
1515
name="trackingSchedule"
1616
type="string"
17-
description="Defines how often the engine should check for changes in terms. Uses standard cron syntax to set the schedule."
18-
default="`30 */12 * * *` (runs every 12 hours at minute 30)"
17+
description="Defines how often the engine should check for changes in terms. Uses standard cron syntax to set the schedule. By default, it runs every 12 hours at minute 30."
18+
default="30 */12 * * *"
1919
/>}}
2020

2121
{{< configOption
2222
name="collectionPath"
2323
type="string"
2424
description="Path to the collection's directory containing declarations directory and metadata file, relative to the engine execution location"
25-
example="`../collections/demo-declarations`"
26-
default="`./`"
25+
example="../collections/demo-declarations"
26+
default="./"
2727
/>}}
2828

2929
### Recorder
@@ -50,21 +50,21 @@ The fetcher section configures how the engine retrieves documents from the web.
5050
name="fetcher.waitForElementsTimeout"
5151
type="number"
5252
description="Maximum wait time for elements to appear in a page (milliseconds)."
53-
default="`10000`"
53+
default="10000"
5454
/>}}
5555

5656
{{< configOption
5757
name="fetcher.navigationTimeout"
5858
type="number"
5959
description="Maximum wait time for a page to load (milliseconds)."
60-
default="`30000`"
60+
default="30000"
6161
/>}}
6262

6363
{{< configOption
6464
name="fetcher.language"
6565
type="string"
6666
description="Language code (ISO 639-1) for request headers."
67-
default="`en`"
67+
default="en"
6868
/>}}
6969

7070
### Notifier
@@ -75,14 +75,14 @@ The notifier section sets up how notifications are sent when new versions of ter
7575
name="notifier.sendInBlue.updatesListId"
7676
type="string"
7777
description="SendInBlue contacts list ID of persons to notify on terms updates."
78-
default="`850`"
78+
default="850"
7979
/>}}
8080

8181
{{< configOption
8282
name="notifier.sendInBlue.updateTemplateId"
8383
type="string"
8484
description="SendInBlue email template ID used for updates notifications."
85-
default="`7`"
85+
default="7"
8686
/>}}
8787

8888
### Logger
@@ -93,42 +93,42 @@ The logger section configures logging and error notification settings.
9393
name="logger.smtp.host"
9494
type="string"
9595
description="SMTP server hostname."
96-
default="`smtp-relay.sendinblue.com`"
96+
default="smtp-relay.sendinblue.com"
9797
/>}}
9898

9999
{{< configOption
100100
name="logger.smtp.username"
101101
type="string"
102102
description="Username for SMTP server authentication."
103-
default="`[email protected]`"
103+
104104
/>}}
105105

106106
{{< configOption
107107
name="logger.sendMailOnError.to"
108108
type="string"
109109
description="Email address for error notifications."
110-
example="`[email protected]`"
110+
111111
/>}}
112112

113113
{{< configOption
114114
name="logger.sendMailOnError.from"
115115
type="string"
116116
description="Sender email address for error notifications."
117-
example="`[email protected]`"
117+
118118
/>}}
119119

120120
{{< configOption
121121
name="logger.sendMailOnError.sendWarnings"
122122
type="boolean"
123123
description="Set to true to also send email in case of warning."
124-
default="`false`"
124+
default="false"
125125
/>}}
126126

127127
{{< configOption
128128
name="logger.timestampPrefix"
129129
type="boolean"
130130
description="Set to false to avoid duplicate timestamps if logs are managed by a process manager."
131-
default="`true`"
131+
default="true"
132132
/>}}
133133

134134
### Reporter
@@ -139,43 +139,43 @@ The reporter section manages how issues are reported when terms content is inacc
139139
name="reporter.type"
140140
type="string"
141141
description="Type of reporter"
142-
example="`github`"
143-
allowedValues="`github`, `gitlab`"
142+
example="github"
143+
allowedValues="github, gitlab"
144144
/>}}
145145

146146
{{< configOption
147147
name="reporter.repositories.declarations"
148148
type="string"
149149
description="Repository for creating issues."
150-
example="`OpenTermsArchive/demo-declarations`"
150+
example="OpenTermsArchive/demo-declarations"
151151
/>}}
152152

153153
{{< configOption
154154
name="reporter.repositories.versions"
155155
type="string"
156156
description="Repository for versions."
157-
example="`OpenTermsArchive/demo-versions`"
157+
example="OpenTermsArchive/demo-versions"
158158
/>}}
159159

160160
{{< configOption
161161
name="reporter.repositories.snapshots"
162162
type="string"
163163
description="Repository for snapshots."
164-
example="`OpenTermsArchive/demo-snapshots`"
164+
example="OpenTermsArchive/demo-snapshots"
165165
/>}}
166166

167167
{{< configOption
168168
name="reporter.baseURL"
169169
type="string"
170170
description="Base URL for GitLab (if applicable)."
171-
example="`https://gitlab.example.com`"
171+
example="https://gitlab.example.com"
172172
/>}}
173173

174174
{{< configOption
175175
name="reporter.apiBaseURL"
176176
type="string"
177177
description="API base URL for GitLab (if applicable)."
178-
example="`https://api.gitlab.example.com`"
178+
example="https://api.gitlab.example.com"
179179
/>}}
180180

181181
### Dataset
@@ -186,21 +186,21 @@ The dataset section configures how datasets are published.
186186
name="dataset.title"
187187
type="string"
188188
description="Title of the dataset."
189-
default="`sandbox`"
189+
default="sandbox"
190190
/>}}
191191

192192
{{< configOption
193193
name="dataset.versionsRepositoryURL"
194194
type="string"
195195
description="Repository URL for dataset releases."
196-
default="`https://github.com/OpenTermsArchive/sandbox`"
196+
default="https://github.com/OpenTermsArchive/sandbox"
197197
/>}}
198198

199199
{{< configOption
200200
name="dataset.publishingSchedule"
201201
type="string"
202-
description="Cron expression for dataset publishing."
203-
default="`30 8 * * MON` (runs every Monday at 8:30 AM)"
202+
description="Cron expression for dataset publishing. By default, it runs every Monday at 8:30 AM."
203+
default="30 8 * * MON"
204204
/>}}
205205

206206
### Collection API
@@ -211,15 +211,15 @@ The collection API section sets the parameters for the API server.
211211
name="collection-api.api.port"
212212
type="number"
213213
description="Port number for the API server."
214-
example="`8080`"
214+
example="8080"
215215
required=true
216216
/>}}
217217

218218
{{< configOption
219219
name="collection-api.api.basePath"
220220
type="string"
221221
description="Base path for API endpoints."
222-
example="`/collection-api`"
222+
example="/collection-api"
223223
required=true
224224
/>}}
225225

@@ -233,8 +233,8 @@ The storage repositories section set the parameters for supported backends for s
233233
name="storage.type"
234234
type="string"
235235
description="Type of storage backend."
236-
default="`git`"
237-
allowedValues="`git`, `mongo`"
236+
default="git"
237+
allowedValues="git, mongo"
238238
/>}}
239239

240240
### Git
@@ -245,35 +245,35 @@ The Git storage configuration allows to store versions in a Git repository.
245245
name="storage.git.path"
246246
type="string"
247247
description="Path to the versions database directory."
248-
default="`./data/versions`"
248+
default="./data/versions"
249249
/>}}
250250

251251
{{< configOption
252252
name="storage.git.publish"
253253
type="boolean"
254254
description="Boolean to push changes to the origin."
255-
default="`false`"
255+
default="false"
256256
/>}}
257257

258258
{{< configOption
259259
name="storage.git.snapshotIdentiferTemplate"
260260
type="string"
261261
description="Template for snapshot ID reference. `%SNAPSHOT_ID` will be replaced with the actual snapshot ID."
262-
default="`./data/snapshots/%SNAPSHOT_ID`"
262+
default="./data/snapshots/%SNAPSHOT_ID"
263263
/>}}
264264

265265
{{< configOption
266266
name="storage.git.author.name"
267267
type="string"
268268
description="Author name for changes."
269-
default="`Open Terms Archive Bot`"
269+
default="Open Terms Archive Bot"
270270
/>}}
271271

272272
{{< configOption
273273
name="storage.git.author.email"
274274
type="string"
275275
description="Author email for changes."
276-
default="`[email protected]`"
276+
277277
/>}}
278278

279279
### MongoDB
@@ -284,19 +284,19 @@ The MongoDB storage configuration allows to store versions in a MongoDB database
284284
name="storage.mongo.connectionURI"
285285
type="string"
286286
description="MongoDB connection URI."
287-
default="`mongodb://127.0.0.1:27017`"
287+
default="mongodb://127.0.0.1:27017"
288288
/>}}
289289

290290
{{< configOption
291291
name="storage.mongo.database"
292292
type="string"
293293
description="Database name."
294-
default="`open-terms-archive`"
294+
default="open-terms-archive"
295295
/>}}
296296

297297
{{< configOption
298298
name="storage.mongo.collection"
299299
type="string"
300300
description="Collection name."
301-
default="`snapshots`"
301+
default="snapshots"
302302
/>}}

content/collections/references/metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ fr:
208208
name="roles"
209209
type="array of strings"
210210
description="Roles of the entity within the governance, see [collection governance](https://docs.opentermsarchive.org/collections/references/governance/)"
211-
allowedValues="`host`, `administrator`, `curator`, `maintainer`, `sponsor`"
211+
allowedValues="host, administrator, curator, maintainer, sponsor"
212212
example="[host, administrator]"
213213
required=true
214214
/>}}

themes/opentermsarchive/layouts/shortcodes/configOption.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{{ $required := .Get "required" }}
44
{{ $allowedValues := .Get "allowedValues" }}
55
{{ $default := .Get "default" }}
6+
{{ $reference := .Get "reference" }}
67
{{/* Get description either from attribute or nested content */}}
78
{{ $description := .Get "description" }}
89
{{ $example := .Get "example" }}
@@ -20,7 +21,10 @@
2021
</div>
2122
<div class="config-option-details config-option-details__{{ if .Inner }}full{{ end }}">
2223
{{ if $default }}
23-
<div class="config-option-default"><span>Default:</span>{{ $default | markdownify}}</div>
24+
<div class="config-option-default">
25+
<span>Default:</span>
26+
<code>{{ $default | markdownify }}</code>
27+
</div>
2428
{{ end }}
2529
{{ if or $example .Inner }}
2630
<div class="config-option-example"><span>Example:</span>
@@ -32,7 +36,14 @@
3236
</div>
3337
{{ end }}
3438
{{ if $allowedValues }}
35-
<div class="config-option-allowed-values"><span>Allowed values:</span><span class="config-option-allowed-values-list">{{ $allowedValues | markdownify }}</span></div>
39+
{{ $values := split $allowedValues "," }}
40+
<div class="config-option-allowed-values"><span>Allowed values:</span>
41+
<span class="config-option-allowed-values-list">
42+
{{ range $values }}
43+
<code>{{ . | markdownify }}</code>
44+
{{ end }}
45+
</span>
46+
</div>
3647
{{ end }}
3748
</div>
3849
</div>

0 commit comments

Comments
 (0)