Commit graph

7357 commits

Author SHA1 Message Date
satotake
785a31b5b8
navigation: Cache and copy Menu for sorting
.Site.Menus is mutated when it is sorted for now and this causes concurrency problem (#7594)
In this patch, each related sort function copies Menu before sorting to prevent
race condition.

Pages already have such a sort and cache logic and this patch is identical to it.

Closes #7594
2021-05-23 10:42:01 +02:00
Bjørn Erik Pedersen
bc1e05286a deps: Update to LibSASS 3.6.5
See https://github.com/sass/libsass/releases/tag/3.6.5
2021-05-23 10:33:56 +02:00
Bjørn Erik Pedersen
f518b4f71e publisher: Make the HTML element collector more robust
Fixes #8530
2021-05-19 20:43:49 +02:00
Bjørn Erik Pedersen
dc6b7a75ff
Revert "publisher: Make the HTML element collector more robust"
This reverts commit ef0f1a7269.
2021-05-19 03:45:36 +02:00
Bjørn Erik Pedersen
3f515f0e33
Revert "publisher: Get the collector in line with the io.Writer interface"
This reverts commit a9bcd38181.
2021-05-19 03:45:30 +02:00
Bjørn Erik Pedersen
a9bcd38181
publisher: Get the collector in line with the io.Writer interface
As in: Do not retain the input slice.
2021-05-17 19:39:40 +02:00
Bjørn Erik Pedersen
ef0f1a7269 publisher: Make the HTML element collector more robust
Fixes #8530
2021-05-17 17:15:32 +02:00
meehawk
abbc99d4c6
common/maps: Add Scratch.DeleteInMap
Add Scratch.DeleteInMap method. This method works similar to Scratch.SetInMap. It takes in two string parameters, key and mapKey and deletes the value mapped to mapKey in key

Closes #8504
2021-05-17 15:45:33 +02:00
Joe Mooring
76c95f55a5
Display version when building site (#8533)
Closes #8531
2021-05-14 16:45:13 +02:00
Joe Mooring
2c7f5b62f6
docs: Update querify function description and examples
The querify function now accepts a slice per #8305.
2021-05-10 17:18:37 +02:00
Ujjwal Goyal
c46fc838a9 tpl: Allow 'Querify' to take lone slice/interface argument
Querify can now take a lone string/interface slice (with string
keys) as a parameter, or multiple string parameters, to build
URL queries.

Querify earlier used 'Dictionary' to add key/value pairs to a
map to build URL queries. Changed to dynamically generate ordered
key/value pairs. Cannot take string slice as key (earlier
possible due to Dictionary).

Added tests and benchmarks for querify.

Closes #6735
2021-05-09 13:14:14 +02:00
Shohei Ueda
504c78da4b
modules/npm: Change SetEscapeHTML to false
Closes #8512
2021-05-09 00:20:28 +02:00
Bjørn Erik Pedersen
b660ea8d54
Add a benchmark 2021-05-04 17:59:04 +02:00
Bjørn Erik Pedersen
64f88f3011
readme: Update dependency list 2021-05-03 15:55:28 +02:00
Julien Midedji
7a2c10ae60
tpl: Fix countwords to handle special chars
Fixes #8479
2021-05-03 09:10:06 +02:00
hugoreleaser
e1c328df25 releaser: Prepare repository for 0.84.0-DEV
[ci skip]
2021-05-02 15:28:40 +00:00
hugoreleaser
5afe0a57d0 releaser: Add release notes to /docs for release of 0.83.1
[ci skip]
2021-05-02 14:38:02 +00:00
hugoreleaser
8900e33918 releaser: Bump versions for release of 0.83.1
[ci skip]
2021-05-02 14:38:02 +00:00
hugoreleaser
9753e1b9c5 releaser: Add release notes for 0.83.1
[ci skip]
2021-05-02 14:38:02 +00:00
Bjørn Erik Pedersen
ececd1b122 langs/i18n: Fix warning regression in i18n
Fix this by

1. Making sure that only numerical values are treated as plural counts
2. Making sure that `i18n.pluralFormNotFoundError` is not logged as a warning if `other` resolved.

Note that 2. isn't a new problem, but became visible because of the plural improvements in Hugo `0.83.0`.

Fixes #8492
2021-05-02 16:27:22 +02:00
hugoreleaser
b0ca723eb2 releaser: Prepare repository for 0.84.0-DEV
[ci skip]
2021-05-01 12:56:59 +00:00
hugoreleaser
4c65ceccc7 releaser: Add release notes to /docs for release of 0.83.0
[ci skip]
2021-05-01 12:10:05 +00:00
hugoreleaser
57a471a0db releaser: Bump versions for release of 0.83.0
[ci skip]
2021-05-01 12:10:05 +00:00
Bjørn Erik Pedersen
9b63af55bd
Update 0.83.0-relnotes.md 2021-05-01 13:53:25 +02:00
Bjørn Erik Pedersen
23fc65832c
docs: Fix shortcode 2021-05-01 13:01:23 +02:00
hugoreleaser
e7b5e36e04 releaser: Add release notes for 0.83.0
Rename to *-ready.md to continue.
[ci skip]
2021-05-01 10:23:21 +00:00
Bjørn Erik Pedersen
a9b52b4175
docs: Regenerate docs helper 2021-05-01 12:06:24 +02:00
Bjørn Erik Pedersen
b073a1c972
docs: Regenerate CLI docs 2021-05-01 12:05:31 +02:00
Bjørn Erik Pedersen
4227cc1bd3
commands: Remove all dates from gendoc
It creates lots of diffs even if there are no changes.
2021-05-01 12:03:56 +02:00
Bjørn Erik Pedersen
c239c643fe Squashed 'docs/' changes from fb551cc75..bcc4f9324
bcc4f9324 Add transparent background in rgba for search field
fce835fea Trim newlines from .Inner in the 'code' shortcode
9117f54b3 Remove code toggle from netlify.toml
babbb9090 fix version number - 404 error
d28cf15e1 The input search is not displayed correctly in Safari because of the one declaration CSS background property. Safari needs the no-repeat to be after position and size property. Adjusting the search icon to be vertically on center.
f4ef4c146 Repairing link from issue 131 using jamesrhea's comment https://github.com/gohugoio/hugoDocs/issues/131#issuecomment-324083739
7f73f5685 Update related.md (#1436)
41d24297c Mention `not` (#1432)

git-subtree-dir: docs
git-subtree-split: bcc4f93242334f03c6699e2c4226ee178317ec4b
2021-05-01 11:45:45 +02:00
Bjørn Erik Pedersen
d7b22aee46
Merge commit 'c239c643fee10bfa217cb108755b798f8f5f3b10' 2021-05-01 11:45:45 +02:00
Bjørn Erik Pedersen
3cc4fdd6f3 deps: Update getkin/kin-openapi v0.60.0 => v0.61. 2021-04-30 14:27:21 +02:00
Bjørn Erik Pedersen
7eb80a9e6f langs/i18n: Fix multiple unknown language codes
This fixes a bug upstream by temporarily using a patched version of go-i18n.

Closes #7838
2021-04-30 14:26:49 +02:00
Bjørn Erik Pedersen
78c1a6a7c6
deps: Update github.com/evanw/esbuild v0.11.14 => v0.11.16 2021-04-30 12:43:39 +02:00
Joe Mooring
f6745ad358 Remove .Site.Authors from embedded templates
Closes #4458
2021-04-29 17:07:05 +02:00
Robert van Gent
f523e9f0fd deploy: Don't treat a NotFound response for Delete as a fatal error. 2021-04-29 07:07:01 +02:00
Anthony Fok
63cd05ce5a
snap: Switch to deb packages of nodejs and python3-pygments
node/14/stable snap package is not available on ppc64el and s390x.

nodejs deb package currently at 10.19.0~dfsg-3ubuntu1
in Ubuntu 20.04 LTS (base: core20)
2021-04-27 09:04:24 -06:00
Anthony Fok
902535ef11
snapcraft.yaml: Install bin/node from node/14/stable
Resolves regression introduced in my previous commit 243951e.
Special thanks to @jmooring for reporting the issue!

TODO: Strip the bin/node binary?
2021-04-26 10:17:44 -06:00
dependabot[bot]
70aebba04d build(deps): bump github.com/getkin/kin-openapi from 0.55.0 to 0.60.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.55.0 to 0.60.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.55.0...v0.60.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 10:56:48 +02:00
dependabot[bot]
3e3b7d4474 build(deps): bump github.com/evanw/esbuild from 0.11.13 to 0.11.14
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.11.13 to 0.11.14.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.11.13...v0.11.14)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 10:56:03 +02:00
Bjørn Erik Pedersen
c13d368746
resources/page: Fix permalinks pattern detection for some of the sections variants
See #8363
2021-04-25 16:57:09 +02:00
Carlos Alexandro Becker
048418ba74
deps: Update to Chroma v0.9.1 2021-04-25 11:14:25 +02:00
Bjørn Erik Pedersen
eebde0c2ac langs/i18n: Improve plural handling of floats
The go-i18n library expects plural counts with floats to be represented as strings.

Fixes #8464
2021-04-25 11:12:30 +02:00
Bjørn Erik Pedersen
e4dc9a82b5 tpl/collections: Fix where on type mismatches
Fixes #8353
2021-04-23 18:06:49 +02:00
Bjørn Erik Pedersen
0d86a32d8f Make the shortcode template lookup for output formats stable
Fixes #7774
2021-04-23 15:04:35 +02:00
dependabot[bot]
65c502cc81 build(deps): bump github.com/evanw/esbuild from 0.11.12 to 0.11.13
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.11.12 to 0.11.13.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.11.12...v0.11.13)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-23 09:03:16 +02:00
Bjørn Erik Pedersen
537c905ec1 langs/i18n: Revise the plural implementation
There were some issues introduced with the plural counting when we upgraded from v1 to v2 of go-i18n.

This commit improves that situation given the following rules:

* A single integer argument is used as plural count and passed to the i18n template as a int type with a `.Count` method. The latter is to preserve compability with v1.
* Else the plural count is either fetched from the `Count`/`count` field/method/map or from the value itself.
* Any data type is accepted, if it can be converted to an integer, that value is used.

The above means that you can now do pass a single integer and both of the below will work:

```
{{ . }} minutes to read
{{ .Count }} minutes to read
```

Fixes #8454
Closes #7822
See https://github.com/gohugoio/hugoDocs/issues/1410
2021-04-23 07:39:59 +02:00
Anthony Fok
243951ebe9
snapcraft.yaml: Update to "base: core20"
That is, switch to using Ubuntu 20.04 LTS as base,
leveraging new features in Snapcraft 4.x, etc.

It is far from complete, with npm temporarily disabled (hence no PostCSS)
and with Pandoc probably not working yet, but would hopefully get our
Hugo Snap build, which stopped working shortly after v0.80.0, working again.
2021-04-22 09:57:40 -06:00
dependabot[bot]
fe2ee02802 build(deps): bump github.com/frankban/quicktest from 1.11.3 to 1.12.0
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.11.3 to 1.12.0.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.11.3...v1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 15:24:15 +02:00
dependabot[bot]
316d65cd70 build(deps): bump google.golang.org/api from 0.44.0 to 0.45.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.44.0...v0.45.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 13:43:11 +02:00