From 97f8ab1e127060976de13e001a3ff011df7e10a1 Mon Sep 17 00:00:00 2001
From: Karel van Klink <karel.vanklink@geant.org>
Date: Wed, 11 Dec 2024 14:37:26 +0100
Subject: [PATCH] Use extension for generating links that open in a new tab

---
 docs/build-docs.sh                              |  2 +-
 docs/scripts/gen_wf_redirects.py                |  1 +
 docs/source/admin_guide/wfo/overview.md         |  2 +-
 .../source/architecture/components/lso/index.md | 17 ++++++-----------
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/docs/build-docs.sh b/docs/build-docs.sh
index dc4c92c0..6da63d82 100755
--- a/docs/build-docs.sh
+++ b/docs/build-docs.sh
@@ -5,7 +5,7 @@ set -o nounset
 export OSS_PARAMS_FILENAME=../gso/oss-params-example.json
 export TESTING=true
 
-pip install pyyaml mkdocstrings-python mkdocs_gen_files mkdocs-material mkdocs-literate-nav mkdocs-redirects
+pip install pyyaml mkdocstrings-python mkdocs_gen_files mkdocs-material mkdocs-literate-nav mkdocs-redirects mkdocs-open-in-new-tab
 pip install -e ..
 python ./scripts/gen_wf_redirects.py
 
diff --git a/docs/scripts/gen_wf_redirects.py b/docs/scripts/gen_wf_redirects.py
index c4c0d8b3..3b738d8a 100644
--- a/docs/scripts/gen_wf_redirects.py
+++ b/docs/scripts/gen_wf_redirects.py
@@ -29,6 +29,7 @@ with Path.open(root / "docs" / "wf_redirects.yaml", "w") as redirect_file:
     file_content = {
         "plugins": [
             "search",
+            {"open-in-new-tab": {"add_icon": True}},
             {"gen-files": {"scripts": ["scripts/gen_ref_pages.py"]}},
             {"redirects": {"redirect_maps": redirect_map}},
             {"literate-nav": {"nav_file": "SUMMARY.md"}},
diff --git a/docs/source/admin_guide/wfo/overview.md b/docs/source/admin_guide/wfo/overview.md
index d8af9f50..6ec77a2a 100644
--- a/docs/source/admin_guide/wfo/overview.md
+++ b/docs/source/admin_guide/wfo/overview.md
@@ -22,7 +22,7 @@ classDiagram
 
 A node consists of one or more routers, a switch, and a terminal server. 
 In general -- as laid out more extensively 
-<a href="https://wiki.geant.org/display/NETENG/001+-+Topology+and+physical+layout" target="_blank">here</a> 
+[here](https://wiki.geant.org/display/NETENG/001+-+Topology%2C+physical+layout+and+site+design) 
 (behind login) -- a PoP consists of:
 
 * One or two routers
diff --git a/docs/source/architecture/components/lso/index.md b/docs/source/architecture/components/lso/index.md
index a1e1e0d4..bcfc35f9 100644
--- a/docs/source/architecture/components/lso/index.md
+++ b/docs/source/architecture/components/lso/index.md
@@ -18,11 +18,9 @@ library dependencies.
 
 ## Inner workings
 
-LSO uses <a href="https://ansible.readthedocs.io/projects/runner/en/latest/"
-target="_blank">`ansible-runner`</a> for the execution of Ansible playbooks.
-This package fully dictates the way in which GAP interacts with Ansible itself.
-LSO only introduces an API with a single REST endpoint that exposes its
-functionality.
+LSO uses [`ansible-runner`](https://ansible.readthedocs.io/projects/runner/en/latest/) for the execution of Ansible
+playbooks.  This package fully dictates the way in which GAP interacts with Ansible itself. LSO only introduces an API
+with a single REST endpoint that exposes its functionality.
 
 In the case of GAP, all Ansible playbooks operate without an inventory that
 contains all relevant `group_vars` and `host_vars`. The inventory is passed to
@@ -148,15 +146,12 @@ full-fledged API request to LSO, an example call is given.
 
 ## Code documentation
 
-Code documentation for LSO can be found
-<a href="https://workfloworchestrator.org/lso" target="_blank">here</a>.
+Code documentation for LSO can be found [here](https://workfloworchestrator.org/lso).
 
 ## Deployment within GÉANT
 
-For the deployment in GÉANT, LSO runs inside a Docker container. The Dockerfile
-used to build this container is available <a href=
-"https://gitlab.software.geant.org/goat/gap/lso/-/blob/develop/Dockerfile"
-target="_blank">here</a>.
+For the deployment in GÉANT, LSO runs inside a Docker container. A Dockerfile that can be used to build this container
+is available [here](https://github.com/workfloworchestrator/lso/blob/main/Dockerfile.example).
 
 When building the Docker image, some Ansible roles and collections are installed
 that are required for interacting with Juniper and Nokia equipment. For another
-- 
GitLab