From 539464fb7593d86310331688c46bb55470ba702b Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Tue, 12 Nov 2024 14:24:08 -0500 Subject: [PATCH 1/3] Theme updates: - Refactor content shortcode --- .../linode/linode-docs-theme/config.toml | 2 +- .../layouts/partials/sections/head-src.html | 2 +- .../layouts/shortcodes/content.html | 24 +++++-------------- _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 ++ 6 files changed, 12 insertions(+), 22 deletions(-) diff --git a/_vendor/github.com/linode/linode-docs-theme/config.toml b/_vendor/github.com/linode/linode-docs-theme/config.toml index 7838573bb9..850f986ae6 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config.toml @@ -177,7 +177,7 @@ path = "github.com/gohugoio/hugo-mod-jslibs/turbo/v8" [security] enableInlineShortcodes = false [security.exec] - allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$'] + allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$', '^git$'] osEnv = ['(?i)^(.*)$'] [security.funcs] diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/partials/sections/head-src.html b/_vendor/github.com/linode/linode-docs-theme/layouts/partials/sections/head-src.html index ef77010842..638d408d45 100644 --- a/_vendor/github.com/linode/linode-docs-theme/layouts/partials/sections/head-src.html +++ b/_vendor/github.com/linode/linode-docs-theme/layouts/partials/sections/head-src.html @@ -15,7 +15,7 @@ {{/* styles */}} {{ $options := dict "inlineImports" true }} {{ $styles := resources.Get "css/styles.css" }} -{{ $styles = $styles | resources.PostCSS $options }} +{{ $styles = $styles | css.PostCSS $options }} {{ if (ne hugo.Environment "development") }} {{ $styles = $styles | minify | fingerprint | resources.PostProcess }} {{ end }} diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/shortcodes/content.html b/_vendor/github.com/linode/linode-docs-theme/layouts/shortcodes/content.html index 02abb52289..63851cf9a7 100644 --- a/_vendor/github.com/linode/linode-docs-theme/layouts/shortcodes/content.html +++ b/_vendor/github.com/linode/linode-docs-theme/layouts/shortcodes/content.html @@ -1,20 +1,8 @@ -{{ $file := .Get 0 }} -{{ if .Page.Params.os }} - {{ $class := .Get 1 }} - {{ $p := .Site.GetPage $file }} - {{ if $p }} -
- {{ $p.Content }} -
- {{ else }} - {{/* warnf "Content shortcode is empty: %s" .Position */}} - {{ end }} -{{ else }} - {{ $p := .Site.GetPage $file }} - {{ if $p }} +{{ $file := .Get 0 -}} +{{ $p := or (.Page.GetPage $file) (site.GetPage $file) -}} +{{ if $p -}} {{/* Note: The indendation matters here and we want none, and especially not 4 spaces, which will render it as a code block. */}} {{ $p.RenderShortcodes }} - {{ else }} - {{/* warnf "Content shortcode is empty: %s" .Position */}} - {{ end }} -{{ end }} +{{ else -}} + {{ warnf "Included content not found: %s" .Position -}} +{{ end -}} \ No newline at end of file diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 69746d9400..048c8fca94 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/linode/linode-docs-theme v0.0.0-20241107185827-f54f3d0cc486 +# github.com/linode/linode-docs-theme v0.0.0-20241112191537-cb59b44a8bd6 # github.com/linode/linode-website-partials v0.0.0-20241107184419-08ebb197096e # github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.21300.20800 # github.com/gohugoio/hugo-mod-jslibs/turbo/v8 v8.20000.20400 diff --git a/go.mod b/go.mod index 73daf4bb2e..970f5ee310 100644 --- a/go.mod +++ b/go.mod @@ -7,5 +7,5 @@ require ( github.com/gohugoio/hugo-mod-jslibs/turbo/v7 v7.20300.20000 // indirect github.com/instantpage/instant.page v5.1.1+incompatible // indirect github.com/linode/linode-api-docs/v4 v4.176.0 // indirect - github.com/linode/linode-docs-theme v0.0.0-20241107185827-f54f3d0cc486 // indirect + github.com/linode/linode-docs-theme v0.0.0-20241112191537-cb59b44a8bd6 // indirect ) diff --git a/go.sum b/go.sum index c3e8212076..6fedd19aa3 100644 --- a/go.sum +++ b/go.sum @@ -304,6 +304,8 @@ github.com/linode/linode-docs-theme v0.0.0-20241107173628-e39045c56363 h1:Q129Rq github.com/linode/linode-docs-theme v0.0.0-20241107173628-e39045c56363/go.mod h1:f3XbKgch4DFA6jz2k7snVPDoQEiWwsJu4u54BbUiCKs= github.com/linode/linode-docs-theme v0.0.0-20241107185827-f54f3d0cc486 h1:MFZMFqmpEcI7UK6b0Qp8rGLVefdDd5TzElLOACP1CWc= github.com/linode/linode-docs-theme v0.0.0-20241107185827-f54f3d0cc486/go.mod h1:MCx/heCsE3R5qiYUpDueNgFiTG9TphMMgy4U+GiM0O0= +github.com/linode/linode-docs-theme v0.0.0-20241112191537-cb59b44a8bd6 h1:hSQHr/kOf7n7SZzHmgf6gwYLc+71/tCUHmLhka2YILs= +github.com/linode/linode-docs-theme v0.0.0-20241112191537-cb59b44a8bd6/go.mod h1:MCx/heCsE3R5qiYUpDueNgFiTG9TphMMgy4U+GiM0O0= github.com/linode/linode-website-partials v0.0.0-20221205205120-b6ea1aaa59fb/go.mod h1:K1Em3lwb16JiCwNVftAFwWGhyB9Zkl/nXhxjBBUC1Ao= github.com/linode/linode-website-partials v0.0.0-20221222200538-99862e429110/go.mod h1:K1Em3lwb16JiCwNVftAFwWGhyB9Zkl/nXhxjBBUC1Ao= github.com/linode/linode-website-partials v0.0.0-20230201145731-a8703d0a954a/go.mod h1:K1Em3lwb16JiCwNVftAFwWGhyB9Zkl/nXhxjBBUC1Ao= From 52e0540ec7953e3f53a0484b6f214d36b178e7ff Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Tue, 12 Nov 2024 14:45:56 -0500 Subject: [PATCH 2/3] Update Hugo to 0.138.0 --- .../workflows/update-algolia-on-schedule.yaml | 2 +- CONTRIBUTING.md | 16 ++++++++-------- config.toml | 2 +- netlify.toml | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update-algolia-on-schedule.yaml b/.github/workflows/update-algolia-on-schedule.yaml index 1c9de94495..359a087d3e 100644 --- a/.github/workflows/update-algolia-on-schedule.yaml +++ b/.github/workflows/update-algolia-on-schedule.yaml @@ -48,7 +48,7 @@ jobs: - name: Set up Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.125.7' + hugo-version: ${{ vars.HUGO_VERSION }} - name: Checkout docs repo uses: actions/checkout@v3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8bdc278dd..1d52293eed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,7 +70,7 @@ To Install the latest Node.js LTS release on Windows, navigate to the [downloads ### Install Hugo -The Linode documentation library is built using [Hugo](http://gohugo.io), an open-source static site generator. In order to preview your guide before submission, you need to install Hugo on your local computer. This site currently uses **Hugo v0.125.7**. To remain consistent in the testing and development process, it's recommended to install this version instead of using a newer version. +The Linode documentation library is built using [Hugo](http://gohugo.io), an open-source static site generator. In order to preview your guide before submission, you need to install Hugo on your local computer. This site currently uses **Hugo v0.138.0**. To remain consistent in the testing and development process, it's recommended to install this version instead of using a newer version. Note: If you observe any issues on a newer version, please [file an issue](https://github.com/linode/docs/issues) in the docs GitHub repository. @@ -78,10 +78,10 @@ Note: If you observe any issues on a newer version, please [file an issue](https To install Hugo, download the appropriate binary for your system, extract it, and move it to a directory within your PATH. -1. Download the file below that corresponds with the OS and platform on your local system. If you don't see your system on this list, you can find additional files on the [Hugo v0.125.7 GitHub release page](https://github.com/gohugoio/hugo/releases/tag/v0.125.7) under **Assets**. +1. Download the file below that corresponds with the OS and platform on your local system. If you don't see your system on this list, you can find additional files on the [Hugo v0.138.0 GitHub release page](https://github.com/gohugoio/hugo/releases/tag/v0.138.0) under **Assets**. - - **macOS:** https://github.com/gohugoio/hugo/releases/download/v0.125.7/hugo_extended_0.125.7_darwin-universal.tar.gz - - **Linux:** https://github.com/gohugoio/hugo/releases/download/v0.125.7/hugo_extended_0.125.7_Linux-64bit.tar.gz + - **macOS:** https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_darwin-universal.tar.gz + - **Linux:** https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_Linux-64bit.tar.gz You can download this file through a terminal using the curl command, replacing [url] with the URL for your platform: @@ -115,7 +115,7 @@ To install Hugo, download the appropriate binary for your system, extract it, an While macOS and Linux are preferred by most of the core Linode Docs team, it's also possible to use Hugo on Windows. -1. Download the [hugo_extended_0.125.7_windows-amd64.zip](https://github.com/gohugoio/hugo/releases/download/v0.125.7/hugo_extended_0.125.7_windows-amd64.zip) file. Additional files for other operating systems can be found on the [Hugo v0.125.7 GitHub release page](https://github.com/gohugoio/hugo/releases/tag/v0.125.7) under **Assets**. +1. Download the [hugo_extended_0.138.0_windows-amd64.zip](https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_windows-amd64.zip) file. Additional files for other operating systems can be found on the [Hugo v0.138.0 GitHub release page](https://github.com/gohugoio/hugo/releases/tag/v0.138.0) under **Assets**. 1. Extract the file to the directory you'd like to install Hugo under, such as `C:\Hugo\bin`. @@ -184,10 +184,10 @@ For more information about using Git, refer to the [official Git documentation]( This section is only relevant to contributors who have previously worked on the docs repo prior to the Tailwind v3 upgrade (which occurred on July 6th, 2023 in docs release v1.252.0). After you merge in changes from this release (and onward), you will likely notice display issues when previewing the site locally. This is due to Tailwind v3 and the way it integrates with Hugo (and our theme). To complete the upgrade locally and fix any display issues, follow the steps below. -1. Upgrade Hugo to v0.125.7. On macOS, run the following commands in a temporary folder (not in your docs repo): +1. Upgrade Hugo to v0.138.0. On macOS, run the following commands in a temporary folder (not in your docs repo): - curl -OL https://github.com/gohugoio/hugo/releases/download/v0.125.7/hugo_extended_0.125.7_darwin-universal.tar.gz - tar -xvzf hugo_extended_0.125.7_darwin-universal.tar.gz + curl -OL https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_darwin-universal.tar.gz + tar -xvzf hugo_extended_0.138.0_darwin-universal.tar.gz mv hugo /usr/local/bin If you are using a different operating system, refer to the [Install Hugo](#install-hugo) section above. diff --git a/config.toml b/config.toml index adb8fa465e..e80f792af1 100644 --- a/config.toml +++ b/config.toml @@ -163,7 +163,7 @@ anchor = "smart" [security] enableInlineShortcodes = false [security.exec] - allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$'] + allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$', '^git$'] osEnv = ['(?i)^(.*)$'] [security.funcs] diff --git a/netlify.toml b/netlify.toml index ba7a2a3f05..ad0a41d9ea 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,11 +3,11 @@ publish = "public" command = "hugo version && hugo config && hugo --gc --minify -d public/docs;" [context.production.environment] -HUGO_VERSION = "0.125.7" +HUGO_VERSION = "0.138.0" HUGO_PARAMS_TESTENV="Netlify" [context.deploy-preview.environment] -HUGO_VERSION = "0.125.7" +HUGO_VERSION = "0.138.0" HUGO_PARAMS_TESTENV="Netlify" [[plugins]] From e722becd912ed6e77b41d84e7aaf89dc053d06fc Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Tue, 12 Nov 2024 15:29:04 -0500 Subject: [PATCH 3/3] Fix broken shortguide references --- .../installing-snapd-certbot-dnf-rhel-shortguide/index.md | 2 +- .../index.md | 2 +- .../index.md | 2 +- docs/marketplace-docs/guides/jenkins/index.md | 2 +- docs/marketplace-docs/guides/plesk/index.md | 4 +++- docs/marketplace-docs/guides/secure-your-server/index.md | 2 +- docs/marketplace-docs/guides/wireguard/index.md | 2 +- docs/marketplace-docs/guides/zabbix/index.md | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/guides/security/ssl/_shortguides/installing-snapd-certbot-dnf-rhel-shortguide/index.md b/docs/guides/security/ssl/_shortguides/installing-snapd-certbot-dnf-rhel-shortguide/index.md index e4372bcdee..d2e4b4b2f8 100644 --- a/docs/guides/security/ssl/_shortguides/installing-snapd-certbot-dnf-rhel-shortguide/index.md +++ b/docs/guides/security/ssl/_shortguides/installing-snapd-certbot-dnf-rhel-shortguide/index.md @@ -1,5 +1,5 @@ --- -slug: installing-snapd-certbot-dnf-shortguide +slug: installing-snapd-certbot-dnf-rhel-shortguide title: "Shortguide" description: "Shortguide" authors: ["Linode"] diff --git a/docs/guides/security/ssl/enabling-https-using-certbot-with-apache-on-fedora/index.md b/docs/guides/security/ssl/enabling-https-using-certbot-with-apache-on-fedora/index.md index 456f94606f..8bbb7d04eb 100644 --- a/docs/guides/security/ssl/enabling-https-using-certbot-with-apache-on-fedora/index.md +++ b/docs/guides/security/ssl/enabling-https-using-certbot-with-apache-on-fedora/index.md @@ -37,7 +37,7 @@ This guide is written for a non-root user. Commands that require elevated privil {{% content "configuring-firewalld-for-web-traffic-shortguide" %}} -{{% content "installing-snapd-certbot-dnf-shortguide" %}} +{{% content "installing-snapd-certbot-dnf-rhel-shortguide" %}} {{% content "requesting-certificate-apache-certbot-shortguide" %}} diff --git a/docs/guides/security/ssl/enabling-https-using-certbot-with-nginx-on-fedora/index.md b/docs/guides/security/ssl/enabling-https-using-certbot-with-nginx-on-fedora/index.md index 980dd438b3..fab335ea9d 100644 --- a/docs/guides/security/ssl/enabling-https-using-certbot-with-nginx-on-fedora/index.md +++ b/docs/guides/security/ssl/enabling-https-using-certbot-with-nginx-on-fedora/index.md @@ -35,7 +35,7 @@ This guide is written for a non-root user. Commands that require elevated privil {{% content "configuring-firewalld-for-web-traffic-shortguide" %}} -{{% content "installing-snapd-certbot-dnf-shortguide" %}} +{{% content "installing-snapd-certbot-dnf-rhel-shortguide" %}} {{% content "requesting-certificate-nginx-certbot-shortguide" %}} diff --git a/docs/marketplace-docs/guides/jenkins/index.md b/docs/marketplace-docs/guides/jenkins/index.md index fe23b51460..66eca26467 100644 --- a/docs/marketplace-docs/guides/jenkins/index.md +++ b/docs/marketplace-docs/guides/jenkins/index.md @@ -34,7 +34,7 @@ license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' ### Jenkins Options -{{% content "marketplace-required-limited-user-shortguide" %}} +{{% content "marketplace-required-limited-user-fields-shortguide" %}} {{% content "marketplace-special-character-limitations-shortguide" %}} {{% content "marketplace-custom-domain-fields-shortguide" %}} diff --git a/docs/marketplace-docs/guides/plesk/index.md b/docs/marketplace-docs/guides/plesk/index.md index 5539710eaa..4d20c2f7b5 100644 --- a/docs/marketplace-docs/guides/plesk/index.md +++ b/docs/marketplace-docs/guides/plesk/index.md @@ -33,9 +33,11 @@ license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' - **Suggested minimum plan:** All plan types and sizes can be used. - **SOA Email Address** *(required):* An email address for free Let's Encrypt SSL. -{{% content "marketplace-required-limited-user-shortguide" %}} + +{{% content "marketplace-required-limited-user-fields-shortguide" %}} {{% content "marketplace-custom-domain-fields-shortguide" %}} + ## Getting Started after Deployment ### Access your Plesk Site diff --git a/docs/marketplace-docs/guides/secure-your-server/index.md b/docs/marketplace-docs/guides/secure-your-server/index.md index 55516aff8a..bad37d019e 100644 --- a/docs/marketplace-docs/guides/secure-your-server/index.md +++ b/docs/marketplace-docs/guides/secure-your-server/index.md @@ -30,7 +30,7 @@ This Marketplace App automatically configures a new Compute Instance with a limi ### Secure Your Server Setup Options -{{% content "marketplace-required-limited-user-shortguide" %}} +{{% content "marketplace-required-limited-user-fields-shortguide" %}} {{% content "marketplace-custom-domain-fields-shortguide" %}} diff --git a/docs/marketplace-docs/guides/wireguard/index.md b/docs/marketplace-docs/guides/wireguard/index.md index a4aa89953d..1f71c73713 100644 --- a/docs/marketplace-docs/guides/wireguard/index.md +++ b/docs/marketplace-docs/guides/wireguard/index.md @@ -155,6 +155,6 @@ This test should be performed once you have configured a WireGuard client and up | [**WireGuard**](https://www.wireguard.com) | VPN software. | | [**UFW (UncomplicatedFireWall)**](https://wiki.ubuntu.com/UncomplicatedFirewall) | Firewall utility. The Port assigned during the [WireGuard Options](#wireguard-options) step of the deployment will allow outgoing and incoming traffic. | -{{% content "marketplace-update-note" %}} +{{% content "marketplace-update-note-shortguide" %}} "WireGuard" is a registered trademark of Jason A. Donenfeld. \ No newline at end of file diff --git a/docs/marketplace-docs/guides/zabbix/index.md b/docs/marketplace-docs/guides/zabbix/index.md index 75a6773f71..0a5b3e8add 100644 --- a/docs/marketplace-docs/guides/zabbix/index.md +++ b/docs/marketplace-docs/guides/zabbix/index.md @@ -39,7 +39,7 @@ license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' {{% content "marketplace-required-limited-user-fields-shortguide" %}} -{{% content "marketplace-custom-domains-field-shortguide" %}} +{{% content "marketplace-custom-domain-fields-shortguide" %}} - **Zabbix Server Name:** Local hostname for Zabbix server. Defaults to `zabbix-server`