From c1a57266ceee03d62b98609bf2317f8ef8c18574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Biron?= Date: Mon, 1 Sep 2025 15:07:26 +0200 Subject: [PATCH 1/3] Specify supported Node versions --- content/collections/tutorial/create.md | 2 +- content/terms/how-to/track-terms.md | 2 +- content/terms/tutorial/track.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/collections/tutorial/create.md b/content/collections/tutorial/create.md index aacd5ecd..ec487e45 100644 --- a/content/collections/tutorial/create.md +++ b/content/collections/tutorial/create.md @@ -14,7 +14,7 @@ By the end, you'll have a working collection that tracks changes to a service's ## Prerequisites -- [Node.js](https://nodejs.org/en) is installed on your system. +- [Node.js](https://nodejs.org/en) (version >=16.0.0 and < 23.0.0) is installed on your system. - You have basic familiarity with the command line. - You know how to use a text editor. diff --git a/content/terms/how-to/track-terms.md b/content/terms/how-to/track-terms.md index 5946b964..9ef34679 100644 --- a/content/terms/how-to/track-terms.md +++ b/content/terms/how-to/track-terms.md @@ -16,7 +16,7 @@ Having understood briefly how a declaration is structured in JSON format, we nee In order to add declarations: -1. You need to have [Node.js](https://nodejs.org/en/) installed on your machine. If you don't have it, you can download it from the official website [here](https://nodejs.org/en/download/). +1. You need to have [Node.js](https://nodejs.org/en/) (version >=16.0.0 and < 23.0.0) installed on your machine. If you don't have it, you can download it from the official website [here](https://nodejs.org/en/download/). 2. You need to have git installed on your machine. If you don't have it, you can download it from the official website [here](https://git-scm.com/downloads). ## Adding a declaration diff --git a/content/terms/tutorial/track.md b/content/terms/tutorial/track.md index 07028dfd..fe52974d 100644 --- a/content/terms/tutorial/track.md +++ b/content/terms/tutorial/track.md @@ -12,7 +12,7 @@ By the end, you'll have tracked a service's privacy policy. You will also have a ## Prerequisites -- [Node.js](https://nodejs.org/en) is installed on your system. +- [Node.js](https://nodejs.org/en) (version >=16.0.0 and < 23.0.0) is installed on your system. - You have basic familiarity with the command line. - You have basic familiarity with HTML and CSS selectors. - You know how to use a text editor. From 4e4aca672cd02d92522167060d7ac068d4ccd4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Biron?= Date: Mon, 1 Sep 2025 16:08:05 +0200 Subject: [PATCH 2/3] Add engine package shortcode --- layouts/shortcodes/engine-package.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 layouts/shortcodes/engine-package.html diff --git a/layouts/shortcodes/engine-package.html b/layouts/shortcodes/engine-package.html new file mode 100644 index 00000000..892d7f72 --- /dev/null +++ b/layouts/shortcodes/engine-package.html @@ -0,0 +1,13 @@ +{{ $enginePackage := readFile "node_modules/@opentermsarchive/engine/package.json" | unmarshal }} +{{ $key := .Get "key" }} + +{{ $value := $enginePackage }} +{{ range split $key "." }} + {{ $value = index $value . }} +{{ end }} + +{{- if $value -}} + {{- $value -}} +{{- else -}} + {{- warnf "Key '%s' not found in engine package.json" $key -}} +{{- end -}} From 5c59db1eb8ef4fd3865b341c60935ae2019db06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Biron?= Date: Mon, 1 Sep 2025 16:08:51 +0200 Subject: [PATCH 3/3] Display up to date Node version supported by engine --- content/collections/tutorial/create.md | 2 +- content/terms/how-to/track-terms.md | 2 +- content/terms/tutorial/track.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/collections/tutorial/create.md b/content/collections/tutorial/create.md index ec487e45..2f24dd02 100644 --- a/content/collections/tutorial/create.md +++ b/content/collections/tutorial/create.md @@ -14,7 +14,7 @@ By the end, you'll have a working collection that tracks changes to a service's ## Prerequisites -- [Node.js](https://nodejs.org/en) (version >=16.0.0 and < 23.0.0) is installed on your system. +- [Node.js](https://nodejs.org/en) (version {{< engine-package key="engines.node" >}}) is installed on your system. - You have basic familiarity with the command line. - You know how to use a text editor. diff --git a/content/terms/how-to/track-terms.md b/content/terms/how-to/track-terms.md index 9ef34679..74d467d3 100644 --- a/content/terms/how-to/track-terms.md +++ b/content/terms/how-to/track-terms.md @@ -16,7 +16,7 @@ Having understood briefly how a declaration is structured in JSON format, we nee In order to add declarations: -1. You need to have [Node.js](https://nodejs.org/en/) (version >=16.0.0 and < 23.0.0) installed on your machine. If you don't have it, you can download it from the official website [here](https://nodejs.org/en/download/). +1. You need to have [Node.js](https://nodejs.org/en/) (version {{< engine-package key="engines.node" >}}) installed on your machine. If you don't have it, you can download it from the official website [here](https://nodejs.org/en/download/). 2. You need to have git installed on your machine. If you don't have it, you can download it from the official website [here](https://git-scm.com/downloads). ## Adding a declaration diff --git a/content/terms/tutorial/track.md b/content/terms/tutorial/track.md index fe52974d..d4990ae1 100644 --- a/content/terms/tutorial/track.md +++ b/content/terms/tutorial/track.md @@ -12,7 +12,7 @@ By the end, you'll have tracked a service's privacy policy. You will also have a ## Prerequisites -- [Node.js](https://nodejs.org/en) (version >=16.0.0 and < 23.0.0) is installed on your system. +- [Node.js](https://nodejs.org/en) (version {{< engine-package key="engines.node" >}}) is installed on your system. - You have basic familiarity with the command line. - You have basic familiarity with HTML and CSS selectors. - You know how to use a text editor.