From 4af4f81f0ca76658db072bb50cc66b57167cb215 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 4 Dec 2023 14:29:41 -0800 Subject: [PATCH 1/4] Defend against missing aliases in quick-reference shortcode --- layouts/shortcodes/quick-reference.html | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 layouts/shortcodes/quick-reference.html diff --git a/layouts/shortcodes/quick-reference.html b/layouts/shortcodes/quick-reference.html new file mode 100644 index 0000000000..95044f9340 --- /dev/null +++ b/layouts/shortcodes/quick-reference.html @@ -0,0 +1,39 @@ +{{/* +Renders the child sections of the given top-level section, listing each childs's immediate descendants. + +@param {string} section The top-level section to render. +@returns template.HTML + +@example {{% quick-reference section="functions" %}} +*/}} + +{{ $section := "" }} +{{ with .Get "section" }} + {{ $section = . }} +{{ else }} + {{ errorf "The %q shortcodes requires a 'section' parameter. See %s" .Name .Postion }} +{{ end }} + +{{/* Do not change the markdown indentation, and do not remove blank lines. */}} +{{ with site.GetPage $section }} + {{ range .Sections }} + +## {{ .LinkTitle }} +{{ .RawContent }} + + {{ range .Pages }} + {{ $aliases := "" }} + {{ if eq .Section "functions" }} + {{ with .Params.action.aliases }} + {{ $aliases = delimit . " or " }} + {{ end }} + {{ end }} + +[{{ .LinkTitle }}]({{ .RelPermalink }}) {{ with $aliases }}({{ . }}){{ end }} +: {{ .Description }} + + {{ end }} + {{ end }} +{{ else }} + {{ errorf "The %q shortcodes was unable to find the %q section. See %s" .Name $section .Postion }} +{{ end }} From b4aeb2a4d515f157ad64616c2278fd7aea8428c2 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 4 Dec 2023 21:45:43 -0800 Subject: [PATCH 2/4] Update GitHub hosting workflow example --- .../en/hosting-and-deployment/hosting-on-github/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/hosting-and-deployment/hosting-on-github/index.md b/content/en/hosting-and-deployment/hosting-on-github/index.md index f41250279b..a7e57a0915 100644 --- a/content/en/hosting-and-deployment/hosting-on-github/index.md +++ b/content/en/hosting-and-deployment/hosting-on-github/index.md @@ -99,7 +99,7 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.120.2 + HUGO_VERSION: 0.120.4 steps: - name: Install Hugo CLI run: | @@ -114,7 +114,7 @@ jobs: fetch-depth: 0 - name: Setup Pages id: pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v4 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Build with Hugo @@ -142,7 +142,7 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v3 {{< /code >}} Step 7 From 78a1b116fc7d53958035778c07aef2472b2e7c71 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 4 Dec 2023 22:06:47 -0800 Subject: [PATCH 3/4] Improve Gentooo installation instructions --- content/en/installation/linux.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/content/en/installation/linux.md b/content/en/installation/linux.md index 5e45021037..4a63dcb54a 100644 --- a/content/en/installation/linux.md +++ b/content/en/installation/linux.md @@ -107,13 +107,24 @@ sudo dnf install hugo ### Gentoo -Builds from source using Portage package manager. Customize how it builds (stardard or extended edition) easily with [USE flags] : +Derivatives of the [Gentoo] distribution of Linux include [Calculate Linux], [Funtoo], and others. Follow the instructions below to install the extended edition of Hugo: -```sh -sudo emerge www-apps/hugo -``` +1. Specify the `sass` [USE] flag in /etc/portage/package.use/mysql: + + ```text + www-apps/hugo sass + ``` + +2. Build using the Portage package manager: + + ```sh + sudo emerge www-apps/hugo + ``` -[USE flags]: https://wiki.gentoo.org/wiki/USE_flag +[Calculate Linux]: https://www.calculate-linux.org/ +[Funtoo]: https://www.funtoo.org/ +[Gentoo]: https://www.gentoo.org/ +[USE]: https://wiki.gentoo.org/wiki/Hugo#USE_flags ### openSUSE From 6b7a5f7be33743ca39f20f54fc7c9197ce54ac67 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 4 Dec 2023 22:08:20 -0800 Subject: [PATCH 4/4] Fix typo --- content/en/getting-started/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 2ab5450f3e..089bee8be2 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -455,7 +455,7 @@ See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies). ### theme -: See [module configuration](/hugo-modules/configuration/#module-configuration-imports) for how to import a theme. +See [module configuration](/hugo-modules/configuration/#module-configuration-imports) for how to import a theme. ### themesDir