From 8af3b236c01f6dc564838db28fc5dc3a15c099af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 1 Mar 2021 13:50:10 +0100 Subject: [PATCH 01/14] Update theme --- .../gohugoio/gohugoioTheme/data/sponsors.toml | 14 +++--- .../layouts/_default/baseof.html | 7 ++- .../layouts/_default/single.html | 48 +++++++++---------- .../gohugoioTheme/layouts/partials/gtag.html | 2 +- .../home-page-sections/installation.html | 3 +- .../partials/home-page-sections/sponsors.html | 4 +- .../gohugoioTheme/layouts/showcase/list.html | 2 +- .../gohugoio/gohugoioTheme/package.json | 43 +++++++++++++++++ .../static/images/sponsors/brave-logo.svg | 1 + _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 + 12 files changed, 88 insertions(+), 42 deletions(-) create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/package.json create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index 9261ffc78..0940da6d7 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -1,9 +1,3 @@ -[[banners]] -name = "Forestry.io" -link = "https://forestry.io/" -logo = "/images/sponsors/forestry-logotype.svg" -copy = "" - [[banners]] name = "Linode" link = "https://www.linode.com/" @@ -14,4 +8,12 @@ copy = "" name = "eSolia" link = "https://esolia.com/post/why-did-esolia-choose-hugo/" logo = "/images/sponsors/esolia-logo.svg" +copy = "" + + +[[banners]] +name = "Brave" +link = "https://brave.com/" +logo = "/images/sponsors/brave-logo.svg" +bgcolor = "#5A2FA1" copy = "" \ No newline at end of file diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html index a83d3f662..0de21a255 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html @@ -39,6 +39,8 @@ {{ $.Scratch.Set "stylesheet" . }} {{end}} + {{ block "scripts" . }} {{- partial "site-scripts.html" . -}} @@ -53,9 +55,6 @@ {{ partial "gtag" . }} {{ end }} - - - @@ -69,4 +68,4 @@ - \ No newline at end of file + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html index 48c015c51..8cd289624 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html @@ -1,31 +1,31 @@ {{ define "main" }} -
-
+
+
-
+
{{- partial "toc.html" . -}} -
- - -
- {{ partial "nav-links-docs.html" . }} -
-
-
+ +
+ {{ partial "nav-links-docs.html" . }} +
-
-
- {{ partial "docs/page-meta-data.html" . }} - {{ partial "page-edit.html" . }} - {{ partial "tags.html" . }} +
+
+ +
+
+ {{ partial "docs/page-meta-data.html" . }} + {{ partial "page-edit.html" . }} + {{ partial "tags.html" . }} +
- -{{ end }} \ No newline at end of file +{{ end }} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html index 2cedc384a..fe9f4d2aa 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html @@ -6,7 +6,7 @@ gtag('js', new Date()); {{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }} - gtag('config', '{{ . }}', {'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); + gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); /** * Function that tracks a click on an outbound link in Analytics. diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html index 4bea1a54a..a23cae11d 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html @@ -14,7 +14,7 @@
Hugo Gopher
-

Mac OS

+

macOS

$ brew install hugo
@@ -35,5 +35,4 @@ - diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index f9f5ec588..a808655a6 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -1,4 +1,4 @@ -{{$classes_box := "ba b--light-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}} +{{$classes_box := "ba b--dark-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}} {{$gtag := .gtag | default "unknown" }} {{ with .cx.Site.Data.sponsors }}
@@ -8,7 +8,7 @@ {{ range .banners }} {{ $banner := . }} {{if .logo}} -
+
{{with .link -}} {{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }} {{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html index b0083fc0f..bff52ad8d 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html @@ -17,7 +17,7 @@ {{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}} {{ template "_internal/pagination.html" . }}
-
The Showcase articles are copyright the content authors. Any open source license will be attached.
+
The Showcase articles are copyrighted by their respective content authors. Any open source license will be attached.
{{ end }} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/package.json b/_vendor/github.com/gohugoio/gohugoioTheme/package.json new file mode 100644 index 000000000..daffbc0f0 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/package.json @@ -0,0 +1,43 @@ +{ + "name": "gohugo-default-styles", + "version": "1.1.0", + "description": "Default Theme for Hugo Sites", + "main": "index.js", + "homepage": "https://gohugo.io/", + "bugs": { + "url": "https://github.com/gohugoio/gohugoioTheme/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gohugoio/gohugoioTheme.git" + }, + "author": "budparr", + "license": "MIT", + "scripts": { + "build": "NODE_ENV=production webpack", + "build-dev": "NODE_ENV=development webpack --progress --watch", + "start": "npm run build-dev" + }, + "devDependencies": { + "clean-webpack-plugin": "^1.0.0", + "clipboard": "^2.0.4", + "css-loader": "^4.3.0", + "docsearch.js": "^2.6.1", + "file-loader": "^2.0.0", + "glob-all": "^3.1.0", + "highlight.js": "^9.13.1", + "lazysizes": "^5.2.1", + "mini-css-extract-plugin": "^0.4.4", + "postcss": "^7.0.32", + "postcss-cssnext": "^3.1.0", + "postcss-import": "^12.0.1", + "postcss-loader": "^3.0.0", + "purgecss-webpack-plugin": "^1.3.1", + "scrolldir": "^1.4.0", + "tachyons": "^4.7.0", + "typeface-muli": "0.0.54", + "webpack": "^4.44.1", + "webpack-command": "^0.4.2" + }, + "dependencies": {} +} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg new file mode 100644 index 000000000..27cdd974d --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg @@ -0,0 +1 @@ +brave_logo_2color_reversed \ No newline at end of file diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 200400694..d3402db0b 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f +# github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 diff --git a/go.mod b/go.mod index 4199c2307..b389a795f 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs go 1.12 -require github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 // indirect diff --git a/go.sum b/go.sum index eaaa0e560..d19e6e7b8 100644 --- a/go.sum +++ b/go.sum @@ -23,3 +23,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7 h1:Sy0hlWyZ github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4HD7tUbaU8RIGeMay84bIBWRVVLE3yajPas4= github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= +github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 h1:ShqzOFeeg54FPSuS6q8HSeTVgj2xNZRe/YS0jNbi21g= +github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= From f1c64cd5a50dc7921920a4c804578b4082da1395 Mon Sep 17 00:00:00 2001 From: swamidass Date: Sat, 6 Mar 2021 14:38:01 -0600 Subject: [PATCH 02/14] Improved documentation. This is based on @bep 's explanation here: https://discourse.gohugo.io/t/intersect-function-and-order/31607?u=swamidass --- content/en/functions/intersect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/functions/intersect.md b/content/en/functions/intersect.md index 9ab7f3c3a..004479531 100644 --- a/content/en/functions/intersect.md +++ b/content/en/functions/intersect.md @@ -1,7 +1,7 @@ --- title: intersect linktitle: intersect -description: Returns the common elements of two arrays or slices. +description: Returns the common elements of two arrays or slices, in the same order as the first array. godocref: date: 2017-02-01 publishdate: 2017-02-01 From 75743968c039784dc735cbebb162eefcad1328d3 Mon Sep 17 00:00:00 2001 From: Jim HL Wei <60511633+jimhwei@users.noreply.github.com> Date: Mon, 8 Mar 2021 09:55:59 -0500 Subject: [PATCH 03/14] Update quick-start.md removed extra quotation strings that prevents hugo from launching Error code: Error: "C:\Hugo\academic\config.toml:4:1": unmarshal failed: Near line 4 (last key parsed 'theme = "academic"'): expected key separator '=', but got '\r' instead --- content/en/getting-started/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md index 28b6b039b..5d88ce75d 100644 --- a/content/en/getting-started/quick-start.md +++ b/content/en/getting-started/quick-start.md @@ -78,7 +78,7 @@ git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/anan Then, add the theme to the site configuration: ```bash -echo 'theme = "ananke"' >> config.toml +echo theme = "ananke" >> config.toml ``` {{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}} From 83190ff12a0de5a488ba71e5d3e111cb3e28b6f3 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Mon, 8 Mar 2021 16:04:52 +0100 Subject: [PATCH 04/14] =?UTF-8?q?fix=20typo:=20"advance=20settings"=20?= =?UTF-8?q?=E2=86=92=20"advanced=20settings"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/en/hosting-and-deployment/hosting-on-github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/hosting-and-deployment/hosting-on-github.md b/content/en/hosting-and-deployment/hosting-on-github.md index 9cabdd938..9b318f45d 100644 --- a/content/en/hosting-and-deployment/hosting-on-github.md +++ b/content/en/hosting-and-deployment/hosting-on-github.md @@ -82,7 +82,7 @@ jobs: publish_dir: ./public ``` -For more advance settings https://github.com/marketplace/actions/hugo-setup +For more advanced settings https://github.com/marketplace/actions/hugo-setup ## Use a Custom Domain From cebfb7a9006f6e6a4626c29e32c522a4e4836c5d Mon Sep 17 00:00:00 2001 From: sjjh <2787214+sjjh@users.noreply.github.com> Date: Sun, 7 Mar 2021 18:05:05 +0100 Subject: [PATCH 05/14] explaination that `weight` key is used for sorting added a sentence to explain that by default menu entries are sorted ascending by their weight. As a new user you otherwise might not be familiar with it. --- content/en/variables/menus.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/en/variables/menus.md b/content/en/variables/menus.md index 6717fecbb..d84837a43 100644 --- a/content/en/variables/menus.md +++ b/content/en/variables/menus.md @@ -64,9 +64,10 @@ a string representing HTML. .Weight : _int_
-Value of the `weight` key if set for the menu entry. If that key is not set, -and if the menu entry is set in a page front-matter, this value defaults to the -page's `.Weight`. +Value of the `weight` key if set for the menu entry. By default the entries in +a menu are sorted ascending by their `weight`. If that key is not set, and if +the menu entry is set in a page front-matter, this value defaults to the page's +`.Weight`. .Parent : _string_
From ec4f7bfff4caaab14817ea66119a854ea9a0ff13 Mon Sep 17 00:00:00 2001 From: Jonny Spicer <38098411+jonnyspicer@users.noreply.github.com> Date: Tue, 9 Mar 2021 20:16:22 +0000 Subject: [PATCH 06/14] Update 404.md Fix typo: CloudFont > CloudFront --- content/en/templates/404.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/404.md b/content/en/templates/404.md index 0916e2299..b7d62ec8f 100644 --- a/content/en/templates/404.md +++ b/content/en/templates/404.md @@ -50,7 +50,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist * Apache. You can specify `ErrorDocument 404 /404.html` in an `.htaccess` file in the root of your site. * Nginx. You might specify `error_page 404 /404.html;` in your `nginx.conf` file. * Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI. -* Amazon CloudFont. You can specify the page in the Error Pages section in the CloudFont Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) +* Amazon CloudFront. You can specify the page in the Error Pages section in the CloudFront Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) * Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors) * Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404) * Azure Static website. You can specify the `Error document path` in the Static website configuration page of the Azure portal. [More details are available in the Static website documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website). From 17bb98a94c74782fc63624f1360c15b92d04b01a Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 9 Mar 2021 16:49:57 -0800 Subject: [PATCH 07/14] Add note about image metadata removal Fixes #1354 --- content/en/content-management/image-processing/index.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index ebd3362dc..a432b9851 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -33,11 +33,17 @@ To print all images paths in a [Page Bundle]({{< relref "/content-management/org The `image` resource can also be retrieved from a [global resource]({{< relref "/hugo-pipes/introduction#from-file-to-resource" >}}) +```go-html-template {{- $image := resources.Get "images/logo.jpg" -}} +``` ## Image Processing Methods -The `image` resource implements the methods `Resize`, `Fit` and `Fill`, each returning the transformed image using the specified dimensions and processing options. The `image` resource also, since Hugo 0.58, implements the method `Exif` and `Filter`. +The `image` resource implements the `Resize`, `Fit`, `Fill`, and `Filter` methods, each returning a transformed image using the specified dimensions and processing options. + +{{% note %}} +Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`](#exif) method with the _original_ image to extract EXIF metadata from JPEG or TIFF images. +{{% /note %}} ### Resize From 1a14cc08a96ef79d2530c905f8d1b8b30b88dca1 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Wed, 10 Mar 2021 06:07:06 +0100 Subject: [PATCH 08/14] Update quick-start.md --- content/en/getting-started/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md index 5d88ce75d..f2378f4a7 100644 --- a/content/en/getting-started/quick-start.md +++ b/content/en/getting-started/quick-start.md @@ -78,7 +78,7 @@ git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/anan Then, add the theme to the site configuration: ```bash -echo theme = "ananke" >> config.toml +echo theme = \"ananke\" >> config.toml ``` {{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}} From 52251fb42017d624b1f8b7705020a1aa9d97248d Mon Sep 17 00:00:00 2001 From: Paul Pineda <6228978+PaulPineda@users.noreply.github.com> Date: Sat, 13 Mar 2021 01:26:15 +0000 Subject: [PATCH 09/14] Update the 'Customize Dates' example to not error (#1357) Part of the work to improve the docs for users who are less familiar with GoLang by removing an error that would cause the template parser to throw with a `malformed character constant` Error as detailed in this issue https://github.com/gohugoio/hugo/issues/8322 --- content/en/content-management/multilingual.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index e24c573c2..28bf6ab06 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -421,13 +421,14 @@ At the time of this writing, Go does not yet have support for internationalized ...then index the non-English date names in your templates like so: ~~~html -