Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/collections/tutorial/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion content/terms/how-to/track-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion content/terms/tutorial/track.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 13 additions & 0 deletions layouts/shortcodes/engine-package.html
Original file line number Diff line number Diff line change
@@ -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 -}}