From 41d24297c798d9bcba2da81aa4ac3daa4a1dea9e Mon Sep 17 00:00:00 2001 From: Salim B Date: Wed, 28 Apr 2021 22:22:49 +0000 Subject: [PATCH 1/8] Mention `not` (#1432) And be more precise about closing `{{ end }}` statement. --- content/en/templates/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 43f88f147..17fa5475c 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -245,7 +245,7 @@ If the _map_, _array_, or _slice_ passed into the range is zero-length then the ### Conditionals -`if`, `else`, `with`, `or`, and `and` provide the framework for handling conditional logic in Go Templates. Like `range`, each statement is closed with an `{{ end }}`. +`if`, `else`, `with`, `or`, `and` and `not` provide the framework for handling conditional logic in Go Templates. Like `range`, `if` and `with` statements are closed with an `{{ end }}`. Go Templates treat the following values as **false**: From 7f73f568516c9cc33548b698bf7aeeb91da61935 Mon Sep 17 00:00:00 2001 From: arhuman Date: Thu, 29 Apr 2021 00:23:13 +0200 Subject: [PATCH 2/8] Update related.md (#1436) Fix typo --- content/en/content-management/related.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md index ec3c3dd6f..c0728fe99 100644 --- a/content/en/content-management/related.md +++ b/content/en/content-management/related.md @@ -84,7 +84,7 @@ related: weight: 10 {{< /code-toggle >}} -Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration abve with the weight of `80`. +Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration above with the weight of `80`. Custom configuration should be set using the same syntax. From f4ef4c146ab1b8cfd0d3c16708fcf257f74b930d Mon Sep 17 00:00:00 2001 From: Darius Lupsa Date: Sat, 24 Apr 2021 18:45:21 +0300 Subject: [PATCH 3/8] Repairing link from issue 131 using jamesrhea's comment https://github.com/gohugoio/hugoDocs/issues/131#issuecomment-324083739 --- content/en/about/benefits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/about/benefits.md b/content/en/about/benefits.md index 020e58981..d5c13a9c3 100644 --- a/content/en/about/benefits.md +++ b/content/en/about/benefits.md @@ -36,7 +36,7 @@ This has many benefits. The most noticeable is performance. HTTP servers are *ve ["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators -["Static Site Generators", O'Reilly]: https://www.oreilly.com/web-platform/free/files/static-site-generators.pdf +["Static Site Generators", O'Reilly]: https://github.com/gohugoio/hugoDocs/files/1242701/static-site-generators.pdf ["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/ [hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/ [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/ From d28cf15e1d20470a71a45f3d2337b97519f313c5 Mon Sep 17 00:00:00 2001 From: Darius Lupsa Date: Sat, 24 Apr 2021 19:39:46 +0300 Subject: [PATCH 4/8] The input search is not displayed correctly in Safari because of the one declaration CSS background property. Safari needs the no-repeat to be after position and size property. Adjusting the search icon to be vertically on center. --- .../gohugoio/gohugoioTheme/layouts/partials/site-search.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html index d8c4b97bf..ff8e170e7 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html @@ -1,6 +1,6 @@ From babbb9090aa7e17a8f32a44846bfa62a14ad1439 Mon Sep 17 00:00:00 2001 From: Darius Lupsa Date: Tue, 27 Apr 2021 20:25:59 +0300 Subject: [PATCH 5/8] fix version number - 404 error --- content/en/getting-started/configuration-markup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index 14a23b734..e19bbe47f 100644 --- a/content/en/getting-started/configuration-markup.md +++ b/content/en/getting-started/configuration-markup.md @@ -43,7 +43,7 @@ typographer attribute : Enable custom attribute support for titles and blocks by adding attribute lists inside single curly brackets (`{.myclass class="class1 class2" }`) and placing it _after the Markdown element it decorates_, on the same line for titles and on a new line directly below for blocks. -{{< new-in "0.81" >}} In Hugo 0.81.0 we added support for adding attributes (e.g. CSS classes) to Markdown blocks, e.g. tables, lists, paragraphs etc. +{{< new-in "0.81.0" >}} In Hugo 0.81.0 we added support for adding attributes (e.g. CSS classes) to Markdown blocks, e.g. tables, lists, paragraphs etc. A blockquote with a CSS class: From 9117f54b39cbede9cf5bf0ea2854d5a3e0052df0 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 30 Apr 2021 12:17:24 -0700 Subject: [PATCH 6/8] Remove code toggle from netlify.toml Closes #1421 --- .../en/hosting-and-deployment/hosting-on-netlify.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/hosting-and-deployment/hosting-on-netlify.md b/content/en/hosting-and-deployment/hosting-on-netlify.md index 74c54b047..9dfc010af 100644 --- a/content/en/hosting-and-deployment/hosting-on-netlify.md +++ b/content/en/hosting-and-deployment/hosting-on-netlify.md @@ -65,17 +65,17 @@ You can [set Hugo version](https://www.netlify.com/blog/2017/04/11/netlify-plus- For production: -{{< code-toggle file="netlify" >}} +{{< code file="netlify.toml" codeLang="toml" >}} [context.production.environment] - HUGO_VERSION = "0.53" -{{< /code-toggle >}} + HUGO_VERSION = "0.82.1" +{{< /code >}} For testing: -``` +{{< code file="netlify.toml" codeLang="toml" >}} [context.deploy-preview.environment] - HUGO_VERSION = "0.53" -``` + HUGO_VERSION = "0.82.1" +{{< /code >}} The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`: From fce835feade31eb120461d2690ef7185c511364d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 30 Apr 2021 12:11:34 -0700 Subject: [PATCH 7/8] Trim newlines from .Inner in the 'code' shortcode Closes #1437 --- layouts/shortcodes/code.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/layouts/shortcodes/code.html b/layouts/shortcodes/code.html index eafc02e6b..0ee25149d 100644 --- a/layouts/shortcodes/code.html +++ b/layouts/shortcodes/code.html @@ -1,25 +1,26 @@ {{ $file := .Get "file" }} {{ $codeLang := "" }} {{ $suffix := findRE "(\\.[^.]+)$" $file 1 }} -{{ with $suffix }} +{{ with $suffix }} {{ $codeLang = (index . 0 | strings.TrimPrefix ".") }} {{ end }} {{ with .Get "codeLang" }}{{ $codeLang = . }}{{ end }} -{{ if eq $codeLang "html"}} +{{ if eq $codeLang "html" }} {{ $codeLang = "go-html-template" }} {{ end }} -
+
{{- with $file -}} -
{{.}}
+
{{ . }}
{{- end -}} {{ if ne (.Get "copy") "false" }} {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} - {{end}} -
- {{ if .Get "nocode" }}{{ $.Inner }}{{ else }}{{ with $codeLang }}{{- highlight $.Inner . "" | -}}{{ else }}
{{- .Inner | string -}}
{{ end }}{{ end }} + {{ end }} +
+ {{ $inner := trim .Inner "\n" | safeHTML }} + {{ if .Get "nocode" }}{{ $inner }}{{ else }}{{ with $codeLang }}{{ highlight $inner . "" }}{{ else }}
{{ $inner }}
{{ end }}{{ end }}
From bcc4f93242334f03c6699e2c4226ee178317ec4b Mon Sep 17 00:00:00 2001 From: Darius Lupsa Date: Sat, 1 May 2021 01:14:06 +0300 Subject: [PATCH 8/8] Add transparent background in rgba for search field Safari has a bug for not showing transparent background when isn't in rgba. For unknown reasons, using commit d28cf15e1d20470a71a45f3d2337b97519f313c5 and 'hugo server', the search field is displayed corectly, but after deployment, isn't anymore. For this reasons I've added the background-color property separately and in rgba. --- .../gohugoio/gohugoioTheme/layouts/partials/site-search.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html index ff8e170e7..b6c521dc9 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html @@ -1,6 +1,6 @@ + \ No newline at end of file