Skip to content

Commit

Permalink
Some more about 0.112.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed May 23, 2023
1 parent 39af43e commit 91eb442
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions content/en/content-management/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Only the obvious non-global options can be overridden per language. Examples of

{{< new-in "0.112.0" >}}

In version `0.112.0` of Hugo we did a major we consolidated all configuration options, but also improved how the languages and their params gets merged with the main configuration. But while testing this on Hugo sites out there, we got some error reports.
In version `0.112.0` of Hugo we did a major we consolidated all configuration options, but also improved how the languages and their params gets merged with the main configuration. But while testing this on Hugo sites out there, we got some error reports, and reverted some of the changes in favour of deprecation warnings:

1. `site.Language.Params` is deprecated. Use `site.Params` directly.
1. The `params` sections on site and language is the only place to put custom user parameters, and `site.Params` will only contain these user defined parameters (see example below).
1. Adding custom params to the top level language config is deprecated, add all of these below `[params]`, see `color` in the example below.

```toml
title = "My blog"
Expand Down
11 changes: 8 additions & 3 deletions layouts/shortcodes/new-in.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{{ $version := .Get 0 }}
{{ if not $version }}
{{ errorf "Missing version in new-in shortcode "}}
{{ errorf "Missing version in new-in shortcode " }}
{{ end }}
{{ $version = $version | strings.TrimPrefix "v" }}
<button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow">
<a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}" target="_blank">New in v{{$version}}</a>
<button
class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow">
<a
href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}"
target="_blank"
>New in v{{ $version }}</a
>
</button>

0 comments on commit 91eb442

Please sign in to comment.