From 326cba38400ae2f39c6c569fcbdf222d59c0d44b Mon Sep 17 00:00:00 2001 From: Jack Hickey <133868041+nginx-jack@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:57:01 +0000 Subject: [PATCH] ExampleSite: Add Everything page Remove unused shortcodes (checked documentation and NIC repos) Add initial spacing --- assets/css/v2/style.css | 79 ++++++++++++++++--- exampleSite/content/includes/index.md | 3 + .../includes/nginx-openid-repo-note.txt | 1 + exampleSite/content/test-product/_index.md | 1 + .../content/test-product/call-out/_index.md | 6 ++ .../call-out/call-out-code-blocks.md | 38 +++++++++ .../call-out/call-out-code-lists.md | 32 ++++++++ .../test-product/code-blocks/_index.md | 6 ++ .../code-blocks/code-blocks-spacing.md | 67 ++++++++++++++++ .../{ => code-blocks}/code-blocks.md | 4 +- .../content/test-product/everything.md | 66 ++++++++++++++++ .../content/test-product/short-page.md | 9 +++ exampleSite/content/test-product/tab-group.md | 44 +++++++++++ layouts/shortcodes/collapse.html | 8 -- layouts/shortcodes/details-disclosure.html | 10 --- layouts/shortcodes/devportal.html | 1 - layouts/shortcodes/heading.html | 4 - 17 files changed, 342 insertions(+), 37 deletions(-) create mode 100644 exampleSite/content/includes/index.md create mode 100644 exampleSite/content/includes/nginx-openid-repo-note.txt create mode 100644 exampleSite/content/test-product/call-out/_index.md create mode 100644 exampleSite/content/test-product/call-out/call-out-code-blocks.md create mode 100644 exampleSite/content/test-product/call-out/call-out-code-lists.md create mode 100644 exampleSite/content/test-product/code-blocks/_index.md create mode 100644 exampleSite/content/test-product/code-blocks/code-blocks-spacing.md rename exampleSite/content/test-product/{ => code-blocks}/code-blocks.md (88%) create mode 100644 exampleSite/content/test-product/everything.md create mode 100644 exampleSite/content/test-product/short-page.md create mode 100644 exampleSite/content/test-product/tab-group.md delete mode 100644 layouts/shortcodes/collapse.html delete mode 100644 layouts/shortcodes/details-disclosure.html delete mode 100644 layouts/shortcodes/devportal.html delete mode 100644 layouts/shortcodes/heading.html diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css index 66cc35d..0542dcc 100644 --- a/assets/css/v2/style.css +++ b/assets/css/v2/style.css @@ -36,7 +36,7 @@ --sidebar-width: 24rem; --sidebar-line-width: 11.5px; --side-gutter-width: 20rem; - --table-top-bottom-spacing: 3rem; + --table-top-bottom-spacing: 1rem; --table-row-space-between: 1.5rem; --table-min-column-spacing-narrow: 1.5rem; --table-min-column-spacing-wide: 0.75rem; @@ -55,9 +55,35 @@ --codeblock-line-box-side-length: 4px; --component-gap: 3.5rem; --overflow-gutter-extension: 1rem; -} -body { + + --flow-gap: 1rem; +} + +html, +body, +p, +ol, +ul, +li, +dl, +dt, +dd, +blockquote, +figure, +fieldset, +legend, +textarea, +pre, +iframe, +hr, +h1, +h2, +h3, +h4, +h5, +h6 { margin: 0; + padding: 0; } @supports (font-variation-settings: normal) { @@ -91,6 +117,22 @@ p { font-weight: 400; } +ul, +ol { + padding: 0; + margin: 0; +} + +ul li, +ol li { + margin-bottom: 0.5rem; +} + +ul li:last-child, +ol li:last-child { + margin-bottom: 0; +} + /* layout */ header { margin: 2rem 2rem 0 2rem; @@ -261,6 +303,7 @@ nav { grid-template-columns: var(--text-content-width-iphone-13) 1fr; margin-top: 2rem; grid-auto-rows: max-content; + grid-gap: var(--flow-gap); } .text-content > :not(.wide) { @@ -793,7 +836,7 @@ main { } p { - margin: 0 0 1.5rem 0; + margin: 0; line-height: 1.5rem; } @@ -836,12 +879,12 @@ a:hover { h1 { font-size: 2rem; - margin: 0 0 2rem 0; + margin: 0 0 1rem 0; } h2 { font-size: 1.5rem; - margin: 0 0 1rem 0; + margin: 1rem 0 .75rem 0; } /* tables */ @@ -910,7 +953,7 @@ table hr { blockquote { border: 1px solid var(--color-foreground); padding: 1rem; - margin: 0 -1rem; + margin: 1rem -1rem; /* solid 3px drop shadow */ box-shadow: 3px 3px 0px var(--color-shadow); @@ -959,6 +1002,15 @@ blockquote.side-callout { grid-row: span 2; } +blockquote > div > * { + margin: 0 0 var(--flow-gap) 0; +} + +blockquote ol, +blockquote ul { + margin: 0 0 1rem 1rem; +} + /* Tabs */ .tabs-container { /* border-bottom: 1px solid black; */ @@ -1037,6 +1089,7 @@ blockquote.side-callout { border: 1px solid var(--color-tabs-divider); border-bottom: 1px solid black; padding: 10px; + margin-bottom: 0; a { text-decoration: none; @@ -1066,6 +1119,7 @@ blockquote.side-callout { .tab-content { border-bottom: 1px solid black; + padding-bottom: 1rem; .tab-pane { display: none; @@ -1096,17 +1150,13 @@ blockquote.side-callout { margin-top: -1.5rem; } -li .code-block { - /* For indented code blocks, move 1rem back to align code with text from heading */ - margin-left: -1rem; -} - .highlight-v2 { border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc; overflow-x: scroll; scrollbar-width: none; line-height: 1.3rem; + padding: 1rem 0; } .highlight-v2.single-line { @@ -1140,6 +1190,11 @@ li .code-block { position: relative; } +ol .code-container, +ul .code-container { + margin-top: 0.75rem; +} + .code-container:hover { .code-copy-button { display: block; diff --git a/exampleSite/content/includes/index.md b/exampleSite/content/includes/index.md new file mode 100644 index 0000000..3d65eaa --- /dev/null +++ b/exampleSite/content/includes/index.md @@ -0,0 +1,3 @@ +--- +headless: true +--- \ No newline at end of file diff --git a/exampleSite/content/includes/nginx-openid-repo-note.txt b/exampleSite/content/includes/nginx-openid-repo-note.txt new file mode 100644 index 0000000..7bfcbdb --- /dev/null +++ b/exampleSite/content/includes/nginx-openid-repo-note.txt @@ -0,0 +1 @@ +You can find more information about the NGINX Plus OpenID Connect integration in the project's [GitHub repo](https://github.com/nginxinc/nginx-openid-connect#nginx-openid-connect). diff --git a/exampleSite/content/test-product/_index.md b/exampleSite/content/test-product/_index.md index 0561b34..325c5e1 100644 --- a/exampleSite/content/test-product/_index.md +++ b/exampleSite/content/test-product/_index.md @@ -2,4 +2,5 @@ description: Test pages for nginx-hugo-theme title: Test pages for nginx-hugo-theme weight: 100 +toc: true --- diff --git a/exampleSite/content/test-product/call-out/_index.md b/exampleSite/content/test-product/call-out/_index.md new file mode 100644 index 0000000..c006a32 --- /dev/null +++ b/exampleSite/content/test-product/call-out/_index.md @@ -0,0 +1,6 @@ +--- +description: Call Out usages +title: Call Out usages +weight: 100 +toc: true +--- diff --git a/exampleSite/content/test-product/call-out/call-out-code-blocks.md b/exampleSite/content/test-product/call-out/call-out-code-blocks.md new file mode 100644 index 0000000..ec75f60 --- /dev/null +++ b/exampleSite/content/test-product/call-out/call-out-code-blocks.md @@ -0,0 +1,38 @@ + +--- +description: Callout - Code Blocks +title: Callout - Code Blocks +weight: 200 +--- + + +## Code Block Multi line + +{{}} +To start the container with the `debian` image: + +```sh +sudo docker run \ +--env=NGINX_LICENSE_JWT="YOUR_JWT_HERE" \ +--env=NGINX_AGENT_SERVER_GRPCPORT=443 \ +--env=NGINX_AGENT_SERVER_HOST=agent.connect.nginx.com \ +--env=NGINX_AGENT_SERVER_TOKEN="YOUR_NGINX_ONE_DATA_PLANE_KEY_HERE" \ +--env=NGINX_AGENT_TLS_ENABLE=true \ +--restart=always \ +--runtime=runc \ +-d private-registry.nginx.com/nginx-plus/agent:debian +``` + +{{}} + +## Code Block Single line + +{{}} +How to read load nginx config + +```sh +nginx -s reload +``` + +{{}} + diff --git a/exampleSite/content/test-product/call-out/call-out-code-lists.md b/exampleSite/content/test-product/call-out/call-out-code-lists.md new file mode 100644 index 0000000..a1fbfce --- /dev/null +++ b/exampleSite/content/test-product/call-out/call-out-code-lists.md @@ -0,0 +1,32 @@ + +--- +description: Callout - Lists +title: Callout - Lists +weight: 200 +--- + + +## Text with Ordered List in note + +- **Using an instance's configuration for the group configuration**: If an instance is the first to join a config sync group and the group's configuration hasn't been defined, the instance’s configuration will become the group’s configuration. Any instances added later will automatically inherit this configuration. + + {{< note >}} If you add multiple instances to a single config sync group, simultaneously (with automation), follow these steps. Your instances will inherit your desired configuration: + + 1. Create a config sync group. + 1. Add a configuration to the config sync group, so all instances inherit it. + 1. Add the instances in a separate operation. + + Your instances should synchronize with your desired configuration within 30 seconds. {{< /note >}} + + +## Text with Unordered List in note + +- **Using an instance's configuration for the group configuration**: If an instance is the first to join a config sync group and the group's configuration hasn't been defined, the instance’s configuration will become the group’s configuration. Any instances added later will automatically inherit this configuration. + + {{< note >}} If you add multiple instances to a single config sync group, simultaneously (with automation), follow these steps. Your instances will inherit your desired configuration: + + - Create a config sync group. + - Add a configuration to the config sync group, so all instances inherit it. + - Add the instances in a separate operation. + + Your instances should synchronize with your desired configuration within 30 seconds. {{< /note >}} \ No newline at end of file diff --git a/exampleSite/content/test-product/code-blocks/_index.md b/exampleSite/content/test-product/code-blocks/_index.md new file mode 100644 index 0000000..680f762 --- /dev/null +++ b/exampleSite/content/test-product/code-blocks/_index.md @@ -0,0 +1,6 @@ +--- +description: Code Block usages +title: Code Block usages +weight: 100 +toc: true +--- diff --git a/exampleSite/content/test-product/code-blocks/code-blocks-spacing.md b/exampleSite/content/test-product/code-blocks/code-blocks-spacing.md new file mode 100644 index 0000000..5abc98b --- /dev/null +++ b/exampleSite/content/test-product/code-blocks/code-blocks-spacing.md @@ -0,0 +1,67 @@ +--- +description: Code Blocks - Spacing and OL/UL +title: Code Blocks - Spacing and OL/UL +weight: 200 +--- + +This is a line. + +```shell +sudo rm -rf / +``` + +This is the line that follows. Great. + +## `h2` - Headers followed by codeblocks +```shell +sudo rm -rf / +``` +### `h3` - Header +```shell +sudo rm -rf / +``` +#### `h4` - Header +```shell +sudo rm -rf / +``` + +## Order List with single line code block + + +1. Create the `/etc/ssl/nginx` directory: + + ```shell + sudo mkdir -p /etc/ssl/nginx + ``` + +1. Log in to [MyF5 Customer Portal](https://account.f5.com/myf5/) and download your `nginx-repo.crt` and `nginx-repo.key` files. + +1. Copy the files to the `/etc/ssl/nginx/` directory: + + ```shell + sudo cp nginx-repo.crt nginx-repo.key /etc/ssl/nginx/ + ``` + +1. Install the prerequisites: + + ```shell + sudo yum install yum-utils procps + ``` + +1. Set up the yum repository by creating the file `nginx-agent.repo` in `/etc/yum.repos.d`, for example using `vi`: + + ```shell + sudo vi /etc/yum.repos.d/nginx-agent.repo + ``` + +1. Add the following lines to `nginx-agent.repo`: + + ```ini + [nginx-agent] + name=nginx agent repo + baseurl=https://pkgs.nginx.com/nginx-agent/centos/$releasever/$basearch/ + sslclientcert=/etc/ssl/nginx/nginx-repo.crt + sslclientkey=/etc/ssl/nginx/nginx-repo.key + gpgcheck=0 + enabled=1 + ``` \ No newline at end of file diff --git a/exampleSite/content/test-product/code-blocks.md b/exampleSite/content/test-product/code-blocks/code-blocks.md similarity index 88% rename from exampleSite/content/test-product/code-blocks.md rename to exampleSite/content/test-product/code-blocks/code-blocks.md index 99a6e6d..04688a4 100644 --- a/exampleSite/content/test-product/code-blocks.md +++ b/exampleSite/content/test-product/code-blocks/code-blocks.md @@ -1,6 +1,6 @@ --- -description: Test Product code blocks -title: Test Product code blocks +description: Code Blocks - with root and non-root +title: Code Blocks - with root and non-root weight: 200 --- diff --git a/exampleSite/content/test-product/everything.md b/exampleSite/content/test-product/everything.md new file mode 100644 index 0000000..62d6d38 --- /dev/null +++ b/exampleSite/content/test-product/everything.md @@ -0,0 +1,66 @@ +--- +description: Everything +title: Everything +weight: 200 +--- + +## before-you-begin + +{{< before-you-begin >}} +Before you can set users' passwords, ensure you have [created users](#create-users) in NGINX Instance Manager. Once you've created the users, you can use one of the following options to set their passwords. +{{< /before-you-begin >}} + +## bootstrap-table + +{{}} +| Method | Endpoint | +|--------|---------------------------------------------------------------------| +| GET | `/api/platform/v1/systems/{systemUID}/instances` | +| POST | `/api/platform/v1/security/{systemUID}/instances/{nginxUID}/config` | +{{}} + +## call-out + +{{}} + + Go templating in Instance Manager includes support for the [Sprig function library](https://masterminds.github.io/sprig/), offering a wide range of additional functions that can be used in templates for advanced operations like string manipulation, data conversion, mathematics, and more. + {{}} + + ## caution + + {{}} +Enabling logs using the **NGINX Logs** blade on your NGINXaaS deployment is now deprecated. This feature will be removed in an upcoming update. If you have issues accessing your NGINX logs using the deprecated method, please follow the steps in this guide to access your NGINX logs. +{{}} + + +## comment + +This one literally stops the contents being rendered... It's for markdown comments. +{{}} +This won't render anything. +{{}} + +## deprecated + +{{< deprecated >}}Using the helper.sh script to download your NGINX Plus certificate and key bundle is deprecated in in NGINX Controller v3.9.{{< /deprecated >}} + +## download + +{{< download "ngf/grafana-dashboard.json" "ngf-grafana-dashboard.json" >}} + +## img + +{{< img src="hero-graphic.webp" caption="hero-graphic" width="50%">}} + +## important + +{{< important >}}If the fingerprint is different, remove the file.{{< /important >}} + +## include + +{{< include "nginx-openid-repo-note.txt" >}} + +## see-also + +{{< see-also >}}See also!{{< /see-also >}} + diff --git a/exampleSite/content/test-product/short-page.md b/exampleSite/content/test-product/short-page.md new file mode 100644 index 0000000..ec16a17 --- /dev/null +++ b/exampleSite/content/test-product/short-page.md @@ -0,0 +1,9 @@ +--- +title: Short Page +description: "Short Page" +weight: 200 +--- + +See the NGINX Gateway Fabric technical specifications page: + + diff --git a/exampleSite/content/test-product/tab-group.md b/exampleSite/content/test-product/tab-group.md new file mode 100644 index 0000000..de30b85 --- /dev/null +++ b/exampleSite/content/test-product/tab-group.md @@ -0,0 +1,44 @@ +--- +description: Tab Group +title: Tab Group +weight: 200 +--- + +## tab-group + + +{{}} + +{{%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%}} +{{}} \ No newline at end of file diff --git a/layouts/shortcodes/collapse.html b/layouts/shortcodes/collapse.html deleted file mode 100644 index 7dd355b..0000000 --- a/layouts/shortcodes/collapse.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

- {{ partial "svg/text-expand.svg" . }} -

-
- {{ .Inner | markdownify }} -
-
\ No newline at end of file diff --git a/layouts/shortcodes/details-disclosure.html b/layouts/shortcodes/details-disclosure.html deleted file mode 100644 index 6bae218..0000000 --- a/layouts/shortcodes/details-disclosure.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ $summary := .Get "summary"}} -{{ $initial_state := .Get "initial_state"}} -{{ $icon := .Get "icon"}} - -
- {{ if .Get "icon_prefix" }} {{ end }}{{ $summary }} - - {{ .Inner | markdownify }} - -
\ No newline at end of file diff --git a/layouts/shortcodes/devportal.html b/layouts/shortcodes/devportal.html deleted file mode 100644 index 58a416b..0000000 --- a/layouts/shortcodes/devportal.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/layouts/shortcodes/heading.html b/layouts/shortcodes/heading.html deleted file mode 100644 index 01e6cf2..0000000 --- a/layouts/shortcodes/heading.html +++ /dev/null @@ -1,4 +0,0 @@ - -{{- $heading := .Get 0 -}} -{{- $heading := printf "%s_heading" $heading -}} -{{- T $heading | safeHTML -}} \ No newline at end of file