Skip to content

Spacing: Fix nested tab group and ol ul #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
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
19 changes: 15 additions & 4 deletions assets/css/v2/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
font-feature-settings: "liga" on, "calt" on;

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

/* base rem = 16px by default, left as percentage for screen readers */
font-size: 100%;
Expand Down Expand Up @@ -120,12 +120,19 @@ p {
ul,
ol {
padding: 0;
margin: 0;
margin: 0.5rem 0 0.5rem 0;
}

ul li,
ol li {
margin-bottom: 0.5rem;
margin: 0.5rem 0 0.5rem 0;
}

ul ul,
ul ol,
ol ul,
ol ol {
padding: 0 0 0 1rem;
}

ul li:last-child,
Expand Down Expand Up @@ -963,7 +970,7 @@ table hr {
blockquote {
border: 1px solid var(--color-foreground);
padding: 1rem;
margin: 1rem -1rem;
margin: 0 -1rem;

/* solid 3px drop shadow */
box-shadow: 3px 3px 0px var(--color-shadow);
Expand Down Expand Up @@ -1140,6 +1147,10 @@ blockquote ul {
}
}

.tab-content > div > * {
margin: 0 0 var(--flow-gap) 0;
}

/* Codeblocks */
.highlight {
padding: 0 1rem 0 1rem;
Expand Down
1 change: 0 additions & 1 deletion exampleSite/content/test-product/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
description: Test pages for nginx-hugo-theme
title: Test pages for nginx-hugo-theme
weight: 100
toc: true
---
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Code Blocks - with root and non-root
title: Code Blocks - with root and non-root
description: Code Blocks - With root and non-root
title: Code Blocks - With root and non-root
weight: 200
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ sudo rm -rf /
sslclientkey=/etc/ssl/nginx/nginx-repo.key
gpgcheck=0
enabled=1
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description: Code Blocks - Stacked
title: Code Blocks - Stacked
weight: 200
---

## Stacked Code Blocks

```shell
sudo yum install yum-utils procps
```

```shell
sudo rm /etc/yum.repos.d/nginx*.repo
sudo rm /etc/yum.repos.d/*app-protect*.repo
```
```js
console.log("Hello World");
console.warn("Hello... World");
console.error("WORLD?! HELLO?!");
```
4 changes: 4 additions & 0 deletions exampleSite/content/test-product/lists/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
description: Lists
title: Lists
---
39 changes: 39 additions & 0 deletions exampleSite/content/test-product/lists/ol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
description: List - OL
title: List - OL
---

The following list describes the connections, preceeded by their types in parentheses. For brevity, the suffix "process" has been omitted from the process descriptions.

1. (HTTPS)
- Read: _NGF_ reads the _Kubernetes API_ to get the latest versions of the resources in the cluster.
- 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_.
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.
1. (File I/O)
- 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`.
- 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_.
1. (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
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.
1. (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
1. (File I/O)
- Write: The _NGINX master_ writes its PID to the `nginx.pid` file stored in the `nginx-run` volume.
- 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.
1. (File I/O)
- Write: The _NGINX master_ writes to the auxiliary Unix sockets folder, which is located in the `/var/run/nginx`
directory.
- 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.
1. (File I/O) The _NGINX master_ sends logs to its _stdout_ and _stderr_, which are collected by the container runtime.
1. (File I/O) An _NGINX worker_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
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.
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.
1. (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
1. (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.




## Regular OL

1. (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
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.
1. (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
39 changes: 39 additions & 0 deletions exampleSite/content/test-product/lists/ul.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
description: List - UL
title: List - UL
---

The following list describes the connections, preceeded by their types in parentheses. For brevity, the suffix "process" has been omitted from the process descriptions.

- (HTTPS)
- Read: _NGF_ reads the _Kubernetes API_ to get the latest versions of the resources in the cluster.
- 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_.
- (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.
- (File I/O)
- 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`.
- 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_.
- (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
- (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.
- (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
- (File I/O)
- Write: The _NGINX master_ writes its PID to the `nginx.pid` file stored in the `nginx-run` volume.
- 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.
- (File I/O)
- Write: The _NGINX master_ writes to the auxiliary Unix sockets folder, which is located in the `/var/run/nginx`
directory.
- 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.
- (File I/O) The _NGINX master_ sends logs to its _stdout_ and _stderr_, which are collected by the container runtime.
- (File I/O) An _NGINX worker_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
- (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.
- (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.
- (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
- (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.




## Regular OL

- (File I/O) _NGF_ writes logs to its _stdout_ and _stderr_, which are collected by the container runtime.
- (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.
- (Signal) To reload NGINX, _NGF_ sends the [reload signal](https://nginx.org/en/docs/control.html) to the **NGINX master**.
44 changes: 0 additions & 44 deletions exampleSite/content/test-product/tab-group.md

This file was deleted.

5 changes: 5 additions & 0 deletions exampleSite/content/test-product/tab-group/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: Tab Group
title: Tab Group
weight: 100
---
102 changes: 102 additions & 0 deletions exampleSite/content/test-product/tab-group/tab-group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
description: Tab Group
title: Tab Group
weight: 200
---

## tab-group

{{<tabs name="common_steps_for_nginx_oss_and_plus">}}

{{%tab name="Ordered List With Code Block types"%}}

1. Create the `/etc/ssl/nginx` directory:

```shell
sudo mkdir -p /etc/ssl/nginx
```

2. Upload **nginx-repo.crt** and **nginx-repo.key** files to the `/etc/ssl/nginx/` directory.

3. Install required dependencies:

```shell
sudo yum install ca-certificates wget
```

4. Remove any previously downloaded NGINX repository files from `/etc/yum.repos.d`:

```shell
sudo rm /etc/yum.repos.d/nginx*.repo
sudo rm /etc/yum.repos.d/*app-protect*.repo
```

{{%/tab%}}

{{%tab name="Code Block"%}}

```shell
nginx -s reload
```

{{%/tab%}}
{{</tabs>}}


## Much nested tab group
To configure a CA cert and/or client certificate and key, a few extra steps are needed.

First, you need to create two Secrets in the `nginx-gateway` namespace. The CA must live under the key `ca.crt`:

```shell
kubectl -n nginx-gateway create secret generic nim-ca --from-file ca.crt
```

The client cert and key must be added to a TLS Secret:

```shell
kubectl -n nginx-gateway create secret tls nim-client --cert /path/to/cert --key /path/to/key
```

{{<tabs name="nim-secret-install">}}

{{%tab name="Manifests"%}}

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.

You also need to define the proper volume mount to mount the Secrets to the nginx container. Add the following volume to the Deployment:

```yaml
- name: nginx-plus-usage-certs
projected:
sources:
- secret:
name: nim-ca
- secret:
name: nim-client
```

and the following volume mounts to the `nginx` container:

```yaml
- mountPath: /etc/nginx/certs-bootstrap/
name: nginx-plus-usage-certs
```

Finally, in the `nginx-includes-bootstrap` ConfigMap, add the following lines to the `mgmt` block:

```text
ssl_trusted_certificate /etc/nginx/certs-bootstrap/ca.crt;
ssl_certificate /etc/nginx/certs-bootstrap/tls.crt;
ssl_certificate_key /etc/nginx/certs-bootstrap/tls.key;
```

{{% /tab %}}

{{%tab name="Helm"%}}

Specify the CA Secret name using the `nginx.usage.caSecretName` helm value. Specify the client Secret name using the `nginx.usage.clientSSLSecretName` helm value.

{{% /tab %}}

{{</tabs>}}
1 change: 0 additions & 1 deletion layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
{{ else }}
<div id="{{ $id }}" class="tab-pane" role="tabpanel" aria-labelledby="{{ $id }}">
{{ end }}
<p>
{{- with .content -}}
{{- . -}}
{{- else -}}
Expand Down
Loading