shithub: hugo

Download patch

ref: c64e9504d87ca3fb877d0048a961069619004043
parent: 3b2fe3cd33b74166c3debec9826826f2b5a54fd9
parent: b74591123eac47a20d1f26ff3e2d291cd9c5cfc0
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Tue Nov 3 08:05:34 EST 2020

Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0'

--- a/docs/content/en/content-management/multilingual.md
+++ b/docs/content/en/content-management/multilingual.md
@@ -52,6 +52,10 @@
 title = "مدونتي"
 weight = 2
 languagedirection = "rtl"
+
+[languages.pt-pt]
+title = "O meu blog"
+weight = 3
 {{< /code-toggle >}}
 
 Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated with `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set.
@@ -66,6 +70,8 @@
 If the default language needs to be rendered below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`.
 
 Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
+
+**Please note:** use lowercase language codes, even when using regional languages (ie. use pt-pt instead of pt-PT). Currently Hugo language internals lowercase language codes, which can cause conflicts with settings like `DefaultContentLanguage` which are not lowercased. Please track the evolution of this issue in [Hugo repository issue tracker](https://github.com/gohugoio/hugo/issues/7344)
 
 ### Disable a Language
 
--- a/docs/content/en/content-management/shortcodes.md
+++ b/docs/content/en/content-management/shortcodes.md
@@ -255,6 +255,11 @@
 {{< instagram BWNjjyYFxVx hidecaption >}}
 
 
+
+{{% note %}}
+The `instagram`-shortcode refers an endpoint of Instagram's API, that's deprecated since October 24th, 2020. Thus, no images can be fetched from this API endpoint, resulting in an error when the `instagram`-shortcode is used. For more information please have a look at GitHub issue [#7879](https://github.com/gohugoio/hugo/issues/7879).
+{{% /note %}}
+
 ### `param`
 
 Gets a value from the current `Page's` params set in front matter, with a fall back to the site param value. It will log an `ERROR` if the param with the given key could not be found in either.
--- a/docs/content/en/functions/format.md
+++ b/docs/content/en/functions/format.md
@@ -94,19 +94,20 @@
 
 ### Cardinal Numbers and Ordinal Abbreviations
 
-Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently supported:
+Spelled-out cardinal numbers (e.g. "one", "two", and "three") are not currently supported. 
 
+Ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently directly supported. By using `{{.Date.Format "Jan 2nd 2006"}}`, Hugo assumes you want to append `nd` as a string to the day of the month. However, you can chain functions together to create something like this:
+
 ```
-{{.Date.Format "Jan 2nd 2006"}}
+{{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} of {{ .Date.Format "January 2006" }}
 ```
 
-Hugo assumes you want to append `nd` as a string to the day of the month and outputs the following:
+This will output:
 
 ```
-Mar 3nd 2017
+5th of March 2017
 ```
 
-<!-- Content idea: see https://discourse.gohugo.io/t/formatting-a-date-with-suffix-2nd/5701 -->
 
 ### Use `.Local` and `.UTC`
 
--- a/docs/content/en/hugo-modules/configuration.md
+++ b/docs/content/en/hugo-modules/configuration.md
@@ -22,6 +22,7 @@
 proxy = "direct"
 noProxy = "none"
 private = "*.*"
+replacements = ""
 {{< /code-toggle >}}
 
 
@@ -36,6 +37,9 @@
 
 private
 : Comma separated glob list matching paths that should be treated as private.
+
+replacements {{< new-in "0.77.0" >}}
+: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `"github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed.
 
 Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example:
 
binary files /dev/null b/docs/content/en/news/0.77.0-relnotes/featured.png differ
--- a/docs/content/en/news/0.77.0-relnotes/index.md
+++ b/docs/content/en/news/0.77.0-relnotes/index.md
@@ -1,15 +1,15 @@
 
 ---
 date: 2020-10-30
-title: "0.77.0"
-description: "0.77.0"
+title: "Hugo 0.77.0: Hugo Modules Improvements and More "
+description: "New Replacements config option for simpler development workflows, ignore errors from getJSON, localized dates, and more."
 categories: ["Releases"]
 ---
 
-	Hugo `0.77.0` is a small, but useful release. Some notable updates are:
+Hugo `0.77.0` is a small, but useful release. Some notable updates are:
 
 * **time.AsTime** accepts an optional location as second parameter, allowing timezone aware printing of dates.
-* You can now build with `hugo install -tags nodeploy` if you don't need the **`hugo deploy`** feature.
+* You can now build with `go install -tags nodeploy` if you don't need the **`hugo deploy`** feature.
 * Remote **`getJSON`** errors can now be ignored by adding `ignoreErrors = ["error-remote-getjson"]` to your site config.
 
 There are also several useful **[Hugo Modules](https://gohugo.io/hugo-modules/)** enhancements:
@@ -17,7 +17,8 @@
 * We have added `Replacements` to the [Module Configuration](https://gohugo.io/hugo-modules/configuration/#module-config-top-level). This should enable a much simpler developer workflow, simpler to set up preview sites for your remote theme etc, as you now can do `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.." hugo` and similar.
 * The module `Path` for local modules can now be absolute for imports defined in the project.
 
-This release represents **38 contributions by 11 contributors** to the main Hugo code base.[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), and [@anthonyfok](https://github.com/anthonyfok) for their ongoing contributions.
+This release represents **38 contributions by 11 contributors** to the main Hugo code base. [@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), and [@anthonyfok](https://github.com/anthonyfok) for their ongoing contributions.
+
 And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour), [@coliff](https://github.com/coliff) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
 
 Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), 
--- a/docs/netlify.toml
+++ b/docs/netlify.toml
@@ -3,7 +3,7 @@
 command = "hugo --gc --minify"
 
 [context.production.environment]
-HUGO_VERSION = "0.76.5"
+HUGO_VERSION = "0.77.0"
 HUGO_ENV = "production"
 HUGO_ENABLEGITINFO = "true"
 
@@ -11,7 +11,7 @@
 command = "hugo --gc --minify --enableGitInfo"
 
 [context.split1.environment]
-HUGO_VERSION = "0.76.5"
+HUGO_VERSION = "0.77.0"
 HUGO_ENV = "production"
 
 [context.deploy-preview]
@@ -18,13 +18,13 @@
 command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
 
 [context.deploy-preview.environment]
-HUGO_VERSION = "0.76.5"
+HUGO_VERSION = "0.77.0"
 
 [context.branch-deploy]
 command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
 
 [context.branch-deploy.environment]
-HUGO_VERSION = "0.76.5"
+HUGO_VERSION = "0.77.0"
 
 [context.next.environment]
 HUGO_ENABLEGITINFO = "true"
binary files /dev/null b/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_480x0_resize_catmullrom_2.png differ
binary files /dev/null b/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_640x0_resize_catmullrom_2.png differ