Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0'

This commit is contained in:
Bjørn Erik Pedersen 2020-11-03 13:05:34 +01:00
commit c64e9504d8
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
9 changed files with 31 additions and 14 deletions

View file

@ -52,6 +52,10 @@ help = "Aide"
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.
@ -67,6 +71,8 @@ If the default language needs to be rendered below its own language code (`/en`)
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
You can disable one or more languages. This can be useful when working on a new translation.

View file

@ -255,6 +255,11 @@ Using the preceding `instagram` with `hidecaption` example above, the following
{{< 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.

View file

@ -94,19 +94,20 @@ More examples can be found in Go's [documentation for the time package][timecons
### 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`

View file

@ -22,6 +22,7 @@ noVendor = ""
proxy = "direct"
noProxy = "none"
private = "*.*"
replacements = ""
{{< /code-toggle >}}
@ -37,6 +38,9 @@ noProxy
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 file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View file

@ -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 @@ There are also several useful **[Hugo Modules](https://gohugo.io/hugo-modules/)*
* 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),

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.76.5"
HUGO_VERSION = "0.77.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.76.5"
HUGO_VERSION = "0.77.0"
HUGO_ENV = "production"
[context.deploy-preview]
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"