Skip to content

Commit

Permalink
attempt to highlight code blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Rieks <[email protected]>
  • Loading branch information
RieksJ committed Apr 17, 2024
1 parent bb651b0 commit 9147901
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 27 deletions.
8 changes: 4 additions & 4 deletions docs/how-to/add-tev2-tools-to-actions-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ You can use this as an example.
This file is a standard/minimal workflow for creating a GitHub Pages website,
where we have inserted the following action-steps:

~~~ yaml
```yaml
# Setting up Node, as this is needed to install the TEv2 tools
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
~~~
```
In many cases, `Node.js` also needs to be set up for static site generator features.
In such cases, something similar to the above would already exist,
and it is not necessary to duplicate that then.

The TEv2-specific part that (always) needs to be added is as follows:

~~~ yaml
```yaml
# TEv2 Tool installation
- name: Install terminology tools globally
run: npm install -g @tno-terminology-design/trrt @tno-terminology-design/hrgt @tno-terminology-design/mrgt @tno-terminology-design/mrg-import
Expand All @@ -51,7 +51,7 @@ The TEv2-specific part that (always) needs to be added is as follows:
with:
commit_message: Update MRGs
file_pattern: 'docs/glossaries/mrg.mve*.yaml'
~~~
```

That's all.

Expand Down
10 changes: 7 additions & 3 deletions docs/how-to/config-files.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# How To Create Config Files
---
title: Config Files
---

# Managing Config Files

A [TEv2 Configuration File](@tev2) is a ([YAML](https://yaml.org/spec/1.2.2/)) file
that provides the various [TEv2 tools](@tev2) with a set of predefined parameters
Expand All @@ -15,7 +19,7 @@ the preferred (i.e., most practical) location is the [scopedir](@tev2) itself.
Here is an example of the [TEv2 configuration file](@tev2) that is used for this [MVE](@).
[This file](/tev2-config.yaml) is located in the [scopedir](@tev2).

~~~ yaml
```yaml
# TEv2 configuration file (for the MVE context)

## General
Expand All @@ -38,7 +42,7 @@ trrt:
converter: html-hovertext-link # style in which TermRefs are to be rendered
input: # glob pattern for files to be processed
- "**/*.md"
~~~
```
All [tools](@tev2) use the fields in the beginning of the file,
i.e.: `scopedir`, `onNotExist` and `output`.
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/generate-hrgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ that is specified in the [MRGRef](@tev2).
What a particular [entry in the glossary](hrg-entry@tev2) would actually look
like can be customized by creating and using so-called [converters](@tev2).

~~~ bash
```bash
# use this command in a GitHub Action for actual deployment
hrgt -c "tev2-config.yaml" -f

# use this command for local testing
hrgt -c "tev2-config.yaml" -o "test-output"
~~~
```

<div style="background-color: #ffffcc; padding: 15px; margin-bottom: 20px; border-left: 6px solid #ffeb3b;">
<strong>Note:</strong> Make sure you execute this command
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/generate-mrgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ in the default [terminology](@tev2) of our MVE-[scope](@tev2).

It so happens that these files have the same contents, but that need not always be the case.

~~~ bash
```bash
# use this command in a GitHub Action or for local testing:
mrgt -c "tev2-config.yaml"
~~~
```

<div style="background-color: #ffffcc; padding: 15px; margin-bottom: 20px; border-left: 6px solid #ffeb3b;">
<strong>Note:</strong> Make sure you execute this command
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/import-mrgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ that we call `tev2` (which is located in the
[TEv2 Specifications repo](https://github.com/tno-terminology-design/tev2-specifications)),
we need to import its [MRGs].

~~~ bash
```bash
# use this command in a GitHub Action or for local testing:
mrg-import -c "tev2-config.yaml"
~~~
```

<div style="background-color: #ffffcc; padding: 15px; margin-bottom: 20px; border-left: 6px solid #ffeb3b;">
<strong>Note:</strong> Make sure you execute this command
Expand Down
8 changes: 4 additions & 4 deletions docs/how-to/install-tev2-tools-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ Help for all this is available, e.g.:

The [TEv2 tools] you need are avaiable as NPM packages. We use the [MRG import](@tev2), [MRGT](@tev2), [HRGT](@tev2) and [TRRT](@tev2), which can be installed by executing:

~~~
```
npm install -g @tno-terminology-design/mrg-import
npm install -g @tno-terminology-design/mrgt
npm install -g @tno-terminology-design/hrgt
npm install -g @tno-terminology-design/trrt
~~~
```

You can verify that they are installed correctly by
making the `docs` directory your current directory,
and then run the following commands

~~~
```
mrg-import --version
mrgt --version
hrgt --version
trrt --version
~~~
```

all of which should return a version number.
In case of trouble, you may consult
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/resolve-termrefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ and that they have a popup text that specifies their definitions.
What a particular [renderable ref](@tev2) would actually look like can be
customized by creating and using so-called [converters](@tev2).

~~~ bash
```bash
# use this command in a GitHub Action for actual deployment
trrt -c "tev2-config.yaml -f"

# use this command for local testing
trrt -c "tev2-config.yaml" -o "test-output"
~~~
```

<div style="background-color: #ffffcc; padding: 15px; margin-bottom: 20px; border-left: 6px solid #ffeb3b;">
<strong>Note:</strong> Make sure you execute this command
Expand Down
9 changes: 6 additions & 3 deletions docs/how-to/saf.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: SAF
---

# How To Create the SAF (Scope Administration File)
# Managing the Scope Administration File (SAF)

A [Scope Administration File (SAF)](saf@tev2) is a
([YAML](https://yaml.org/spec/1.2.2/)) file
Expand All @@ -14,7 +17,7 @@ It is the root relative to which all TEv2-related paths are specified.
Here is an example of the [SAF](@tev2) for this [MVE](@).
For starters, you can simply copy this text, and adjust the contents of the various fields. When you do so, please be very accurate with the values that you provide.

~~~ yaml
```yaml
scope:
# Identifier that we use as a name for this scope
scopetag: mve
Expand Down Expand Up @@ -66,6 +69,6 @@ versions:
termselection:
# include all terms that are curated within the current scope
- "*"
~~~
```
There is a more elaborate explanation of the [SAF](@tev2) in the [TEv2 specifications](saf@tev2).
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ this is also the directory where [TEv2](@tev2) directories and files will be put

Here is a breakdown of the [TEv2](@tev2) specific directories and files:

~~~
```
├── saf.yaml
├── terms
│ ├── mve.md
Expand All @@ -56,7 +56,7 @@ Here is a breakdown of the [TEv2](@tev2) specific directories and files:
├── mrgs
├── glossary.md
└── tev2-config.yaml
~~~
```

- `saf.yaml` is the [scope administration file](saf@tev2).
It provides a centralized record of the resources in the documentation context,
Expand Down
4 changes: 2 additions & 2 deletions docs/terms/workflow-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Here is an example of a [workflow file](@) that can be used
to compile and deploy the static website of an [MVE](@)
that uses GitHub Pages (or Jekyll) for its deployment:

~~~ yaml
```yaml
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

Expand Down Expand Up @@ -112,4 +112,4 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
~~~
```
7 changes: 6 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ site_dir: site

# Plugins can be added here
plugins:
- search
- search

markdown_extensions:
- pymdownx.highlight:
use_pygments: true
- pymdownx.extra

0 comments on commit 9147901

Please sign in to comment.