Skip to content

Commit ae84628

Browse files
committed
Spacing: Fix nested tab group and ol ul
1 parent 04b4748 commit ae84628

File tree

12 files changed

+228
-53
lines changed

12 files changed

+228
-53
lines changed

assets/css/v2/style.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
font-feature-settings: "liga" on, "calt" on;
77

88
/* fallback to slightly thinner font on browsers without variable 'wght' support */
9-
font-weight: 400;
9+
font-weight: 350;
1010

1111
/* base rem = 16px by default, left as percentage for screen readers */
1212
font-size: 100%;
@@ -120,12 +120,19 @@ p {
120120
ul,
121121
ol {
122122
padding: 0;
123-
margin: 0;
123+
margin: 0.5rem 0 0.5rem 0;
124124
}
125125

126126
ul li,
127127
ol li {
128-
margin-bottom: 0.5rem;
128+
margin: 0.5rem 0 0.5rem 0;
129+
}
130+
131+
ul ul,
132+
ul ol,
133+
ol ul,
134+
ol ol {
135+
padding: 0 0 0 1rem;
129136
}
130137

131138
ul li:last-child,
@@ -1016,7 +1023,7 @@ table hr {
10161023
blockquote {
10171024
border: 1px solid var(--color-foreground);
10181025
padding: 1rem;
1019-
margin: 1rem -1rem;
1026+
margin: 0 -1rem;
10201027

10211028
/* solid 3px drop shadow */
10221029
box-shadow: 3px 3px 0px var(--color-shadow);
@@ -1193,6 +1200,10 @@ blockquote ul {
11931200
}
11941201
}
11951202

1203+
.tab-content > div > * {
1204+
margin: 0 0 var(--flow-gap) 0;
1205+
}
1206+
11961207
/* Codeblocks */
11971208
.highlight {
11981209
padding: 0 1rem 0 1rem;

exampleSite/content/test-product/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
description: Test pages for nginx-hugo-theme
33
title: Test pages for nginx-hugo-theme
44
weight: 100
5-
toc: true
65
---

exampleSite/content/test-product/code-blocks/code-blocks.md renamed to exampleSite/content/test-product/code-blocks/code-blocks-root-non-root.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: Code Blocks - with root and non-root
3-
title: Code Blocks - with root and non-root
2+
description: Code Blocks - With root and non-root
3+
title: Code Blocks - With root and non-root
44
weight: 200
55
---
66

exampleSite/content/test-product/code-blocks/code-blocks-spacing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ sudo rm -rf /
6464
sslclientkey=/etc/ssl/nginx/nginx-repo.key
6565
gpgcheck=0
6666
enabled=1
67-
```
67+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
description: Code Blocks - Stacked
3+
title: Code Blocks - Stacked
4+
weight: 200
5+
---
6+
7+
## Stacked Code Blocks
8+
9+
```shell
10+
sudo yum install yum-utils procps
11+
```
12+
13+
```shell
14+
sudo rm /etc/yum.repos.d/nginx*.repo
15+
sudo rm /etc/yum.repos.d/*app-protect*.repo
16+
```
17+
```js
18+
console.log("Hello World");
19+
console.warn("Hello... World");
20+
console.error("WORLD?! HELLO?!");
21+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
description: Lists
3+
title: Lists
4+
---
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
description: List - OL
3+
title: List - OL
4+
---
5+
6+
The following list describes the connections, preceeded by their types in parentheses. For brevity, the suffix "process" has been omitted from the process descriptions.
7+
8+
1. (HTTPS)
9+
- Read: _NGF_ reads the _Kubernetes API_ to get the latest versions of the resources in the cluster.
10+
- Write: _NGF_ writes to the _Kubernetes API_ to update the handled resources' statuses and emit events. If there's more than one replica of _NGF_ and [leader election](https://github.com/nginx/nginx-gateway-fabric/tree/v/charts/nginx-gateway-fabric#configuration) is enabled, only the _NGF_ pod that is leading will write statuses to the _Kubernetes API_.
11+
1. (HTTP, HTTPS) _Prometheus_ fetches the `controller-runtime` and NGINX metrics via an HTTP endpoint that _NGF_ exposes (`:9113/metrics` by default). Prometheus is **not** required by NGINX Gateway Fabric, and its endpoint can be turned off.
12+
1. (File I/O)
13+
- Write: _NGF_ generates NGINX _configuration_ based on the cluster resources and writes them as `.conf` files to the mounted `nginx-conf` volume, located at `/etc/nginx/conf.d`. It also writes _TLS certificates_ and _keys_ from [TLS secrets](https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets) referenced in the accepted Gateway resource to the `nginx-secrets` volume at the path `/etc/nginx/secrets`.
14+
- Read: _NGF_ reads the PID file `nginx.pid` from the `nginx-run` volume, located at `/var/run/nginx`. _NGF_ extracts the PID of the nginx process from this file in order to send reload signals to _NGINX master_.
15+
1. (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
16+
1. (HTTP) _NGF_ fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to _Prometheus_ format used in #2.
17+
1. (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
18+
1. (File I/O)
19+
- Write: The _NGINX master_ writes its PID to the `nginx.pid` file stored in the `nginx-run` volume.
20+
- Read: The _NGINX master_ reads _configuration files_ and the _TLS cert and keys_ referenced in the configuration when it starts or during a reload. These files, certificates, and keys are stored in the `nginx-conf` and `nginx-secrets` volumes that are mounted to both the `nginx-gateway` and `nginx` containers.
21+
1. (File I/O)
22+
- Write: The _NGINX master_ writes to the auxiliary Unix sockets folder, which is located in the `/var/run/nginx`
23+
directory.
24+
- Read: The _NGINX master_ reads the `nginx.conf` file from the `/etc/nginx` directory. This [file](https://github.com/nginx/nginx-gateway-fabric/blob/v/internal/mode/static/nginx/conf/nginx.conf) contains the global and http configuration settings for NGINX. In addition, _NGINX master_ reads the NJS modules referenced in the configuration when it starts or during a reload. NJS modules are stored in the `/usr/lib/nginx/modules` directory.
25+
1. (File I/O) The _NGINX master_ sends logs to its _stdout_ and _stderr_, which are collected by the container runtime.
26+
1. (File I/O) An _NGINX worker_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
27+
1. (Signal) The _NGINX master_ controls the [lifecycle of _NGINX workers_](https://nginx.org/en/docs/control.html#reconfiguration) it creates workers with the new configuration and shutdowns workers with the old configuration.
28+
1. (HTTP) To consider a configuration reload a success, _NGF_ ensures that at least one NGINX worker has the new configuration. To do that, _NGF_ checks a particular endpoint via the unix:/var/run/nginx/nginx-config-version.sock UNIX socket.
29+
1. (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
30+
1. (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.
31+
32+
33+
34+
35+
## Regular OL
36+
37+
1. (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
38+
1. (HTTP) _NGF_ fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to _Prometheus_ format used in #2.
39+
1. (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
description: List - UL
3+
title: List - UL
4+
---
5+
6+
The following list describes the connections, preceeded by their types in parentheses. For brevity, the suffix "process" has been omitted from the process descriptions.
7+
8+
- (HTTPS)
9+
- Read: _NGF_ reads the _Kubernetes API_ to get the latest versions of the resources in the cluster.
10+
- Write: _NGF_ writes to the _Kubernetes API_ to update the handled resources' statuses and emit events. If there's more than one replica of _NGF_ and [leader election](https://github.com/nginx/nginx-gateway-fabric/tree/v/charts/nginx-gateway-fabric#configuration) is enabled, only the _NGF_ pod that is leading will write statuses to the _Kubernetes API_.
11+
- (HTTP, HTTPS) _Prometheus_ fetches the `controller-runtime` and NGINX metrics via an HTTP endpoint that _NGF_ exposes (`:9113/metrics` by default). Prometheus is **not** required by NGINX Gateway Fabric, and its endpoint can be turned off.
12+
- (File I/O)
13+
- Write: _NGF_ generates NGINX _configuration_ based on the cluster resources and writes them as `.conf` files to the mounted `nginx-conf` volume, located at `/etc/nginx/conf.d`. It also writes _TLS certificates_ and _keys_ from [TLS secrets](https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets) referenced in the accepted Gateway resource to the `nginx-secrets` volume at the path `/etc/nginx/secrets`.
14+
- Read: _NGF_ reads the PID file `nginx.pid` from the `nginx-run` volume, located at `/var/run/nginx`. _NGF_ extracts the PID of the nginx process from this file in order to send reload signals to _NGINX master_.
15+
- (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
16+
- (HTTP) _NGF_ fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to _Prometheus_ format used in #2.
17+
- (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
18+
- (File I/O)
19+
- Write: The _NGINX master_ writes its PID to the `nginx.pid` file stored in the `nginx-run` volume.
20+
- Read: The _NGINX master_ reads _configuration files_ and the _TLS cert and keys_ referenced in the configuration when it starts or during a reload. These files, certificates, and keys are stored in the `nginx-conf` and `nginx-secrets` volumes that are mounted to both the `nginx-gateway` and `nginx` containers.
21+
- (File I/O)
22+
- Write: The _NGINX master_ writes to the auxiliary Unix sockets folder, which is located in the `/var/run/nginx`
23+
directory.
24+
- Read: The _NGINX master_ reads the `nginx.conf` file from the `/etc/nginx` directory. This [file](https://github.com/nginx/nginx-gateway-fabric/blob/v/internal/mode/static/nginx/conf/nginx.conf) contains the global and http configuration settings for NGINX. In addition, _NGINX master_ reads the NJS modules referenced in the configuration when it starts or during a reload. NJS modules are stored in the `/usr/lib/nginx/modules` directory.
25+
- (File I/O) The _NGINX master_ sends logs to its _stdout_ and _stderr_, which are collected by the container runtime.
26+
- (File I/O) An _NGINX worker_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
27+
- (Signal) The _NGINX master_ controls the [lifecycle of _NGINX workers_](https://nginx.org/en/docs/control.html#reconfiguration) it creates workers with the new configuration and shutdowns workers with the old configuration.
28+
- (HTTP) To consider a configuration reload a success, _NGF_ ensures that at least one NGINX worker has the new configuration. To do that, _NGF_ checks a particular endpoint via the unix:/var/run/nginx/nginx-config-version.sock UNIX socket.
29+
- (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
30+
- (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.
31+
32+
33+
34+
35+
## Regular OL
36+
37+
- (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
38+
- (HTTP) _NGF_ fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to _Prometheus_ format used in #2.
39+
- (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.

exampleSite/content/test-product/tab-group.md

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
description: Tab Group
3+
title: Tab Group
4+
weight: 100
5+
---
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
description: Tab Group
3+
title: Tab Group
4+
weight: 200
5+
---
6+
7+
## tab-group
8+
9+
{{<tabs name="common_steps_for_nginx_oss_and_plus">}}
10+
11+
{{%tab name="Ordered List With Code Block types"%}}
12+
13+
1. Create the `/etc/ssl/nginx` directory:
14+
15+
```shell
16+
sudo mkdir -p /etc/ssl/nginx
17+
```
18+
19+
2. Upload **nginx-repo.crt** and **nginx-repo.key** files to the `/etc/ssl/nginx/` directory.
20+
21+
3. Install required dependencies:
22+
23+
```shell
24+
sudo yum install ca-certificates wget
25+
```
26+
27+
4. Remove any previously downloaded NGINX repository files from `/etc/yum.repos.d`:
28+
29+
```shell
30+
sudo rm /etc/yum.repos.d/nginx*.repo
31+
sudo rm /etc/yum.repos.d/*app-protect*.repo
32+
```
33+
34+
{{%/tab%}}
35+
36+
{{%tab name="Code Block"%}}
37+
38+
```shell
39+
nginx -s reload
40+
```
41+
42+
{{%/tab%}}
43+
{{</tabs>}}
44+
45+
46+
## Much nested tab group
47+
To configure a CA cert and/or client certificate and key, a few extra steps are needed.
48+
49+
First, you need to create two Secrets in the `nginx-gateway` namespace. The CA must live under the key `ca.crt`:
50+
51+
```shell
52+
kubectl -n nginx-gateway create secret generic nim-ca --from-file ca.crt
53+
```
54+
55+
The client cert and key must be added to a TLS Secret:
56+
57+
```shell
58+
kubectl -n nginx-gateway create secret tls nim-client --cert /path/to/cert --key /path/to/key
59+
```
60+
61+
{{<tabs name="nim-secret-install">}}
62+
63+
{{%tab name="Manifests"%}}
64+
65+
Specify the CA Secret name in the `--usage-report-ca-secret` command-line flag on the `nginx-gateway` container. Specify the client Secret name in the `--usage-report-client-ssl-secret` command-line flag on the `nginx-gateway` container.
66+
67+
You also need to define the proper volume mount to mount the Secrets to the nginx container. Add the following volume to the Deployment:
68+
69+
```yaml
70+
- name: nginx-plus-usage-certs
71+
projected:
72+
sources:
73+
- secret:
74+
name: nim-ca
75+
- secret:
76+
name: nim-client
77+
```
78+
79+
and the following volume mounts to the `nginx` container:
80+
81+
```yaml
82+
- mountPath: /etc/nginx/certs-bootstrap/
83+
name: nginx-plus-usage-certs
84+
```
85+
86+
Finally, in the `nginx-includes-bootstrap` ConfigMap, add the following lines to the `mgmt` block:
87+
88+
```text
89+
ssl_trusted_certificate /etc/nginx/certs-bootstrap/ca.crt;
90+
ssl_certificate /etc/nginx/certs-bootstrap/tls.crt;
91+
ssl_certificate_key /etc/nginx/certs-bootstrap/tls.key;
92+
```
93+
94+
{{% /tab %}}
95+
96+
{{%tab name="Helm"%}}
97+
98+
Specify the CA Secret name using the `nginx.usage.caSecretName` helm value. Specify the client Secret name using the `nginx.usage.clientSSLSecretName` helm value.
99+
100+
{{% /tab %}}
101+
102+
{{</tabs>}}

layouts/shortcodes/tabs.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
{{ else }}
2323
<div id="{{ $id }}" class="tab-pane" role="tabpanel" aria-labelledby="{{ $id }}">
2424
{{ end }}
25-
<p>
2625
{{- with .content -}}
2726
{{- . -}}
2827
{{- else -}}

0 commit comments

Comments
 (0)