diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-11-03 13:05:34 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-11-03 13:05:34 +0100 |
commit | c64e9504d87ca3fb877d0048a961069619004043 (patch) | |
tree | 252be5390b0d7583c71946d6b2893a137f0f5a8f /docs | |
parent | 3b2fe3cd33b74166c3debec9826826f2b5a54fd9 (diff) | |
parent | b74591123eac47a20d1f26ff3e2d291cd9c5cfc0 (diff) | |
download | hugo-c64e9504d87ca3fb877d0048a961069619004043.tar.gz hugo-c64e9504d87ca3fb877d0048a961069619004043.zip |
Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0'
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/content-management/multilingual.md | 6 | ||||
-rw-r--r-- | docs/content/en/content-management/shortcodes.md | 5 | ||||
-rw-r--r-- | docs/content/en/functions/format.md | 11 | ||||
-rw-r--r-- | docs/content/en/hugo-modules/configuration.md | 4 | ||||
-rw-r--r-- | docs/content/en/news/0.77.0-relnotes/featured.png | bin | 0 -> 130926 bytes | |||
-rw-r--r-- | docs/content/en/news/0.77.0-relnotes/index.md | 11 | ||||
-rw-r--r-- | docs/netlify.toml | 8 | ||||
-rw-r--r-- | docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_480x0_resize_catmullrom_2.png | bin | 0 -> 38990 bytes | |||
-rw-r--r-- | docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_640x0_resize_catmullrom_2.png | bin | 0 -> 69792 bytes |
9 files changed, 31 insertions, 14 deletions
diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index 9987bca8c..036d74064 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -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. diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md index b565ffafa..a298bc425 100644 --- a/docs/content/en/content-management/shortcodes.md +++ b/docs/content/en/content-management/shortcodes.md @@ -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. diff --git a/docs/content/en/functions/format.md b/docs/content/en/functions/format.md index cdcec2fb3..b09a77e29 100644 --- a/docs/content/en/functions/format.md +++ b/docs/content/en/functions/format.md @@ -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` diff --git a/docs/content/en/hugo-modules/configuration.md b/docs/content/en/hugo-modules/configuration.md index 175809a37..5405e4e51 100644 --- a/docs/content/en/hugo-modules/configuration.md +++ b/docs/content/en/hugo-modules/configuration.md @@ -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: ``` diff --git a/docs/content/en/news/0.77.0-relnotes/featured.png b/docs/content/en/news/0.77.0-relnotes/featured.png Binary files differnew file mode 100644 index 000000000..4245479a5 --- /dev/null +++ b/docs/content/en/news/0.77.0-relnotes/featured.png diff --git a/docs/content/en/news/0.77.0-relnotes/index.md b/docs/content/en/news/0.77.0-relnotes/index.md index 4ad648e48..c9db7ef99 100644 --- 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 @@ 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), diff --git a/docs/netlify.toml b/docs/netlify.toml index 52b48d35a..d0dc9ded3 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -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" diff --git a/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_480x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_480x0_resize_catmullrom_2.png Binary files differnew file mode 100644 index 000000000..ad6a7a670 --- /dev/null +++ b/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_480x0_resize_catmullrom_2.png diff --git a/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_640x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_640x0_resize_catmullrom_2.png Binary files differnew file mode 100644 index 000000000..7d037e510 --- /dev/null +++ b/docs/resources/_gen/images/news/0.77.0-relnotes/featured_hu95e3f73231f4ff78ed176e490b00b665_130926_640x0_resize_catmullrom_2.png |