Skip to content

Commit 9d7251f

Browse files
authored
add and use anchor shortcode for specific install steps (#363)
Signed-off-by: Etai Lev Ran <[email protected]>
1 parent 3605db6 commit 9d7251f

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

website/content/en/docs/concepts/sites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A `Site` represents a location, such as a Kubernetes cluster, participating in a
99
it wishes to share with other sites. A site is managed by a site administrator,
1010
which is responsible for running the ClusterLink control and data planes. The
1111
administrator will typically deploy the ClusterLink components by configuring
12-
the [deployment CRD]({{< ref "getting-started#setup" >}}). They may also wish to provide
12+
the [deployment CRD]({{< ref "getting-started#deploy-crd-instance" >}}). They may also wish to provide
1313
(often) coarse-grained access policies in accordance with high level corporate
1414
policies (e.g., "production sites should only communicate with other production sites").
1515

website/content/en/docs/getting-started/_index.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Before you start, you must have access to a Kubernetes cluster. For example, you
1111

1212
## Installation
1313

14-
1. To install ClusterLink on Linux or Mac, use the installation script:
14+
1. {{< anchor install-cli>}}To install ClusterLink on Linux or Mac, use the installation script:
1515

1616
```sh
1717
curl -L https://github.com/clusterlink-net/clusterlink/releases/latest/clusterlink.sh | sh -
@@ -39,7 +39,7 @@ Before you start, you must have access to a Kubernetes cluster. For example, you
3939

4040
To set up ClusterLink on a Kubernetes cluster, follow these steps:
4141

42-
1. Create fabric certificates.
42+
1. {{< anchor create-fabric-ca >}}Create the Fabric's CA certificate and private key.
4343
4444
The ClusterLink Fabric is defined as all Kubernetes clusters (sites) that install ClusterLink gateways and can share services between the clusters, enabling communication among those services.
4545
First, create the fabric Certificate Authority (CA):
@@ -50,7 +50,7 @@ To set up ClusterLink on a Kubernetes cluster, follow these steps:
5050
5151
This command will create the CA files `<fabric_name>.cert` and `<fabric_name>.key` in the current folder.
5252
53-
1. Create site certificates.
53+
1. {{< anchor create-site-certs >}}Create site certificates.
5454
5555
Create a site (cluster) certificate:
5656
@@ -60,7 +60,7 @@ To set up ClusterLink on a Kubernetes cluster, follow these steps:
6060
6161
This command will create the certificate files `<site_name>.cert` and `<site_name>.key` in a folder named <site_name>. The `--output <path>` flag can be used to change the folder location.
6262
63-
1. Install ClusterLink deployment operator.
63+
1. {{< anchor install-cl-operator >}}Install ClusterLink deployment operator.
6464
6565
To install ClusterLink on the site, first, install the ClusterLink deployment operator.
6666
@@ -71,7 +71,7 @@ To set up ClusterLink on a Kubernetes cluster, follow these steps:
7171
This command will deploy the ClusterLink deployment operator on the `clusterlink-operator` namespace and convert the site certificates to secrets in the namespace.
7272
The command assumes that kubectl is set to the correct site (Kubernetes cluster) and that the certificates were created in the local folder. If they were not, use the flag `-f <path>`.
7373
74-
1. Deploy clusterlink CRD instance.
74+
1. {{< anchor deploy-crd-instance >}}Deploy clusterlink CRD instance.
7575
7676
After the operator is installed, you can deploy ClusterLink by applying the ClusterLink instance CRD:
7777
@@ -98,4 +98,5 @@ To deploy ClusterLink on another cluster, please repeat steps 2-4 in the console
9898

9999
## Try it out
100100

101-
Check out the [ClusterLink Tutorials]({{< ref "tutorials" >}}) for setting up multi-cluster connectivity for applications using two or more clusters.
101+
Check out the [ClusterLink Tutorials]({{< ref "tutorials" >}}) for setting up
102+
multi-cluster connectivity for applications using two or more clusters.

website/layouts/shortcodes/abbr.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!--
2+
from https://doc.huc.fr.eu.org/en/web/hugo/hugo-shortcodes/
3+
usage: abbr acronym "meaning of acronym"
4+
this will output `acronym` as text on page and add a tooltip displaying
5+
"meaning of acronym" when hovering above the acronym
6+
-->
7+
<abbr {{ .Get 1 | printf `title=%q` | safeHTMLAttr }}>{{ .Get 0 | safeHTML }}</abbr>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!--
2+
usage: anchor "anchor-name" (or anchor id="anchor name")
3+
this will output an HTML anchor element named `anchor-name`
4+
which can then be referenced elsewhere
5+
-->
6+
7+
{{ if .IsNamedParams }}
8+
{{ $id := .Get `id` | lower | safeHTML }}{{ $anchor := anchorize $id }}
9+
<a id="{{ $anchor }}"></a>
10+
{{ else }}
11+
{{ $id := .Get 0 | lower | safeHTML }}{{ $anchor := anchorize $id }}
12+
<a id="{{ $anchor }}"></a>
13+
{{ end }}

0 commit comments

Comments
 (0)