diff --git a/content/collections/tutorial/create.md b/content/collections/tutorial/create.md index aacd5ecd..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) 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 5946b964..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/) 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 07028dfd..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) 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. 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 -}}