brevno-suite/hugo
3 years agoreleaser: Add release notes to /docs for release of 0.89.0 v0.89.0
hugoreleaser [Tue, 2 Nov 2021 10:00:17 +0000 (10:00 +0000)]
releaser: Add release notes to /docs for release of 0.89.0

[ci skip]

3 years agoreleaser: Bump versions for release of 0.89.0
hugoreleaser [Tue, 2 Nov 2021 10:00:17 +0000 (10:00 +0000)]
releaser: Bump versions for release of 0.89.0

[ci skip]

3 years agoreleaser: Add release notes for 0.89.0
hugoreleaser [Tue, 2 Nov 2021 08:14:29 +0000 (08:14 +0000)]
releaser: Add release notes for 0.89.0

3 years agodocs: Regen CLI docs
Bjørn Erik Pedersen [Tue, 2 Nov 2021 08:01:26 +0000 (09:01 +0100)]
docs: Regen CLI docs

3 years agosource: Make ContentBaseName() return the directory for branch bundles
Bjørn Erik Pedersen [Mon, 1 Nov 2021 19:30:34 +0000 (20:30 +0100)]
source: Make ContentBaseName() return the directory for branch bundles

Fixes #9112

3 years agoFix description of lang.FormatNumberCustom
Joe Mooring [Mon, 1 Nov 2021 17:43:41 +0000 (10:43 -0700)]
Fix description of lang.FormatNumberCustom

It currently refers to itself as a simple alternative, when it should
refer to lang.FormatNumber.

3 years agoUpdate Twitter shortcode oEmbed endpoint
Joe Mooring [Sun, 31 Oct 2021 10:56:36 +0000 (03:56 -0700)]
Update Twitter shortcode oEmbed endpoint

The existing endpoint will be retired and removed on November 23, 2021.
References:

- https://twittercommunity.com/t/consolidating-the-oembed-functionality/154690
- https://developer.twitter.com/en/docs/twitter-for-websites/oembed-api#Embedded

This is a backward compatible change.

The existing endpoint requires a single parameter: the id of the tweet.

The new endpoint requires two parameters: the id of the tweet, and the
user with whom it is associated. For the moment, if you supply the wrong
user, the request will be redirected (with a small delay) to the correct
user/id pair. This behavior is undocumented, but we will take advantage
of it as Hugo site authors transition to the new syntax.

{{< tweet 1453110110599868418 >}} --> works, throws warning, deprecate at some point

{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} --> new syntax

Fixes #8130

3 years agocommon/htime: Fix time.Format with Go layouts
Bjørn Erik Pedersen [Mon, 1 Nov 2021 14:20:57 +0000 (15:20 +0100)]
common/htime: Fix time.Format with Go layouts

Fixes #9107

3 years agobuild(deps): bump github.com/evanw/esbuild from 0.13.10 to 0.13.12
dependabot[bot] [Mon, 1 Nov 2021 08:14:48 +0000 (08:14 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.13.10 to 0.13.12

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.13.10 to 0.13.12.
- [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.13.10...v0.13.12)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/yuin/goldmark from 1.4.1 to 1.4.2
dependabot[bot] [Sat, 30 Oct 2021 09:25:08 +0000 (09:25 +0000)]
build(deps): bump github.com/yuin/goldmark from 1.4.1 to 1.4.2

Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoMerge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e'
Bjørn Erik Pedersen [Sun, 31 Oct 2021 12:53:55 +0000 (13:53 +0100)]
Merge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e'

3 years agoSquashed 'docs/' changes from 327003421..39a7fac34
Bjørn Erik Pedersen [Sun, 31 Oct 2021 12:51:51 +0000 (13:51 +0100)]
Squashed 'docs/' changes from 327003421..39a7fac34

39a7fac34 Add .hugo_build.lock to .gitignore
920c716a4 fix a typo: to -> two (#1545)
6f0ba9593 Remove godocref from front matter (#1543)
8ec3d5948 remove link to wercker (#1544)
b56008719 Delete deployment-with-wercker.md (#1542)
e33d29b02 Fix broken links (#1538)
29e9d4c21 Sort commenting systems (#1541)
0b7ea60a7 Delete the news page "HTTP/2 Server Push in Hugo"
6e1515857 Fix quick-start.md (#1525)
62168ab35 Update comments.md (#1535)
d92191512 Small typo (#1539)
129c8834a Correct the PostCSS noMap default value (#1534)
6a5b29fcc Add example to index function (#1536)
e3dd8c507 Update output-formats.md
0c9321ca0 Remove reference to using LiveReload in production environment
4072d6776 Mod testing
09fabf7d6 Fix typo (#1524)
2fce813c8 Fix grammatical error in quick-start.md (#1523)
45230ab4a Hugo Mod testing
2dd4cd9e7 Update index.md
2c3ed62fd netlify: Bump to 0.88.1
648e2a007 Merge branch 'tempv0.88.1'
f216eade1 releaser: Add release notes to /docs for release of 0.88.1
8a7b64d4b Fix typographical errors in 0.88.0 release notes
a4bf86300 Release 0.88
738bb8f38 releaser: Add release notes to /docs for release of 0.88.0
8fcf2c55d highlight: Remove some pygments references
f2b173de2 HTTPS link
c88881c8e Adding link to nginx documentation
6b0a74fe0 Fix typos in docs (#1516)
498b8f0f1 Fix typos in time.Format (#1515)
28723fad6 Fix taxonomy and term examples (#1514)
3ffd00e12 Update front-matter.md
7cc1da82e Fix grammar in 0.86.1 release notes (#1510)
0009c51c3 Update docs helper
7e2f430f4 Update index.md
7857eae7e releaser: Add release notes to /docs for release of 0.87.0
1f08b684b releaser: Add release notes to /docs for release of 0.87.0
36a9e701c docs: Adjust config docs
0f588438e docs: Regen CLI docs
1b4682cd8 docs: Regen docs helper
bc8bbaae9 Merge commit 'bd77f6e1c99e04a476f0b1bb4e44569134e02399' into release-0.87.0
6f2480643 docs: Adjust time zone docs

git-subtree-dir: docs
git-subtree-split: 39a7fac343c289906db644c96079fdcc0298582f

3 years agoreleaser: Fat MacOS binaries
Bjørn Erik Pedersen [Sat, 30 Oct 2021 08:07:27 +0000 (10:07 +0200)]
releaser: Fat MacOS binaries

Fixes #9035

3 years agoreleaser: Only build amd64 binary for freebsd, netbsd, openbsd, dragonfly
Bjørn Erik Pedersen [Sat, 30 Oct 2021 09:25:04 +0000 (11:25 +0200)]
releaser: Only build amd64 binary for freebsd, netbsd, openbsd, dragonfly

Fixes #9102

3 years agotpl/time: Use configured location when date passed to Format is string
Bjørn Erik Pedersen [Sat, 30 Oct 2021 14:06:00 +0000 (16:06 +0200)]
tpl/time: Use configured location when date passed to Format is string

Updates #9084

3 years agobuild(deps): bump github.com/aws/aws-sdk-go from 1.40.8 to 1.41.14
dependabot[bot] [Sat, 30 Oct 2021 07:44:20 +0000 (07:44 +0000)]
build(deps): bump github.com/aws/aws-sdk-go from 1.40.8 to 1.41.14

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.8 to 1.41.14.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.8...v1.41.14)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.79.0 to 0.80.0
dependabot[bot] [Sat, 30 Oct 2021 07:43:20 +0000 (07:43 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.79.0 to 0.80.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.79.0 to 0.80.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.79.0...v0.80.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/evanw/esbuild from 0.13.8 to 0.13.10
dependabot[bot] [Thu, 28 Oct 2021 08:18:39 +0000 (08:18 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.13.8 to 0.13.10

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.13.8 to 0.13.10.
- [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.13.8...v0.13.10)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoresources: Rename excepted filenames for image golden testdata
Anthony Fok [Thu, 28 Oct 2021 22:14:14 +0000 (16:14 -0600)]
resources: Rename excepted filenames for image golden testdata

As documented in commit 30eea3915b67f72611a3b2f4547146d4c6a96864,
some filenames have changed due to cache busting of PNG and Webp images.

This resolves recent TestImageOperationsGolden failure on arm64, ppc64le
and s390x.

See #6387 and #8729

3 years agobuild(deps): bump github.com/frankban/quicktest from 1.13.1 to 1.14.0
dependabot[bot] [Wed, 20 Oct 2021 16:34:52 +0000 (16:34 +0000)]
build(deps): bump github.com/frankban/quicktest from 1.13.1 to 1.14.0

Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.13.1 to 1.14.0.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.13.1...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoFix typo in error message
Joe Mooring [Mon, 25 Oct 2021 20:35:35 +0000 (13:35 -0700)]
Fix typo in error message

3 years agocreate: Validate the target path in hugo new
Bjørn Erik Pedersen [Mon, 25 Oct 2021 10:28:12 +0000 (12:28 +0200)]
create: Validate the target path in hugo new

Fixes #9072

3 years agoFix panic when specifying multiple excludeFiles directives
Bjørn Erik Pedersen [Mon, 25 Oct 2021 10:18:00 +0000 (12:18 +0200)]
Fix panic when specifying multiple excludeFiles directives

Fixes #9076

3 years agohtime: Set zone of datetime from from `go-toml`
satotake [Mon, 25 Oct 2021 17:49:44 +0000 (02:49 +0900)]
htime: Set zone of datetime from from `go-toml`

`go-toml/v2`'s unmarshaler does not specify zone name even if value has
offset explicitly.
To make time-formatting behaviour consistent, convert them into string
in hugo.

Close #8895

3 years agoAdded nodesource apt repository to snap package
Sergio Garcia [Mon, 11 Oct 2021 21:39:02 +0000 (18:39 -0300)]
Added nodesource apt repository to snap package

3 years agoconfig: Set HUGO_ENABLEGITINFO=false override in Set_in_string
Anthony Fok [Fri, 22 Oct 2021 11:12:09 +0000 (05:12 -0600)]
config: Set HUGO_ENABLEGITINFO=false override in Set_in_string

This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.

3 years agohugofs: Add includeFiles and excludeFiles to mount configuration
Bjørn Erik Pedersen [Sat, 16 Oct 2021 14:24:49 +0000 (16:24 +0200)]
hugofs: Add includeFiles and excludeFiles to mount configuration

Fixes #9042

3 years agobuild(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2
dependabot[bot] [Thu, 14 Oct 2021 08:38:44 +0000 (08:38 +0000)]
build(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2

Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/mapstructure
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoresources: Always preserve the original transform error
Bjørn Erik Pedersen [Tue, 19 Oct 2021 18:38:38 +0000 (20:38 +0200)]
resources: Always preserve the original transform error

3 years agoreadme: Add hyperlink to the banner
itsAftabAlam [Tue, 19 Oct 2021 13:59:12 +0000 (19:29 +0530)]
readme: Add hyperlink to the banner

3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.78.0 to 0.79.0
dependabot[bot] [Sun, 17 Oct 2021 15:22:39 +0000 (15:22 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.78.0 to 0.79.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.78.0 to 0.79.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.78.0...v0.79.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agodeps: github.com/evanw/esbuild v0.13.5 => v0.13.8
Bjørn Erik Pedersen [Tue, 19 Oct 2021 06:14:36 +0000 (08:14 +0200)]
deps: github.com/evanw/esbuild v0.13.5 => v0.13.8

3 years agocreate: Return error on no content dirs
Bjørn Erik Pedersen [Tue, 19 Oct 2021 06:08:21 +0000 (08:08 +0200)]
create: Return error on no content dirs

Closes #9056

3 years agoFix file permissions in new archetype implementation
Bjørn Erik Pedersen [Mon, 18 Oct 2021 17:08:19 +0000 (19:08 +0200)]
Fix file permissions in new archetype implementation

Closes #9057

3 years agoFix the "page picker" logic in --navigateToChanged
Bjørn Erik Pedersen [Sun, 17 Oct 2021 14:11:00 +0000 (16:11 +0200)]
Fix the "page picker" logic in --navigateToChanged

Fixes #9051

3 years agoAdd a cross process build lock and use it in the archetype content builder
Bjørn Erik Pedersen [Sun, 17 Oct 2021 09:54:55 +0000 (11:54 +0200)]
Add a cross process build lock and use it in the archetype content builder

Fixes #9048

3 years agoreadme: Fix a typo on OpenBSD
nabbisen [Sun, 17 Oct 2021 19:23:01 +0000 (04:23 +0900)]
readme: Fix a typo on OpenBSD

3 years agodeps: github.com/alecthomas/chroma v0.9.2 => v0.9.4
Bjørn Erik Pedersen [Sun, 17 Oct 2021 14:39:22 +0000 (16:39 +0200)]
deps: github.com/alecthomas/chroma v0.9.2 => v0.9.4

Fixes #8532

3 years agoReimplement archetypes
Bjørn Erik Pedersen [Wed, 13 Oct 2021 06:12:06 +0000 (08:12 +0200)]
Reimplement archetypes

The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes #9032
Fixes #7589
Fixes #9043
Fixes #9046
Fixes #9047

3 years agobuild(deps): bump github.com/tdewolff/minify/v2 from 2.9.21 to 2.9.22
dependabot[bot] [Sun, 10 Oct 2021 18:47:09 +0000 (18:47 +0000)]
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.21 to 2.9.22

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.21 to 2.9.22.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.21...v2.9.22)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agodeps: Update github.com/evanw/esbuild v0.13.5
Bjørn Erik Pedersen [Wed, 13 Oct 2021 06:13:02 +0000 (08:13 +0200)]
deps: Update github.com/evanw/esbuild v0.13.5

3 years agoreleaser: Fix regexp
Iskander (Alex) Sharipov [Tue, 12 Oct 2021 09:32:09 +0000 (12:32 +0300)]
releaser: Fix regexp

Original regexp used a char class which caused the regexp to only
check 1 symbol instead of a substring like "See" and "Closes".
So it would match `e #x` instead of `See #x` and many other
weird combinations.

Tests were passing as they never checked against an input that
would confuse that regexp.

Found with go-critic static analyzer, `badRegexp` checker.

3 years agobuild(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14
dependabot[bot] [Sun, 10 Oct 2021 16:59:28 +0000 (16:59 +0000)]
build(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14

Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.13...v0.0.14)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.75.0 to 0.78.0
dependabot[bot] [Sun, 10 Oct 2021 16:58:38 +0000 (16:58 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.75.0 to 0.78.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.75.0 to 0.78.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.75.0...v0.78.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoreleaser: Update to Go go1.17.2
Bjørn Erik Pedersen [Sun, 10 Oct 2021 14:51:06 +0000 (16:51 +0200)]
releaser: Update to Go go1.17.2

* This now uses the `golang:1.17.2-buster` Docker image which runs GLIBC 2.28-10.
* Also added a build hook to warn us if this happens again in the future.

Fixes #8955

3 years agoFix value of useResourceCacheWhen in TestResourceChainPostCSS
Joe Mooring [Sat, 9 Oct 2021 16:16:52 +0000 (09:16 -0700)]
Fix value of useResourceCacheWhen in TestResourceChainPostCSS

3 years agoAllow multiple plugins in the PostCSS options map
Joe Mooring [Sat, 9 Oct 2021 05:34:08 +0000 (22:34 -0700)]
Allow multiple plugins in the PostCSS options map

Usage:
{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
{{ $style := resources.Get "main.css" | resources.PostCSS $options }}

Fixes #9015

3 years agodocs: Create path.Clean documentation
Joe Mooring [Sat, 9 Oct 2021 18:36:57 +0000 (11:36 -0700)]
docs: Create path.Clean documentation

Related to #9005

3 years agoSkip a test assertion on CI
Bjørn Erik Pedersen [Sat, 9 Oct 2021 15:17:38 +0000 (17:17 +0200)]
Skip a test assertion on CI

Need to investigate later, but got to get the tests green.

3 years agotpl/path: Add path.Clean
Brad [Tue, 5 Oct 2021 14:15:10 +0000 (10:15 -0400)]
tpl/path: Add path.Clean

 Fixes #8885

3 years agoreadme: Remove tracking image
Shalabh Kamboj [Tue, 5 Oct 2021 13:09:11 +0000 (18:39 +0530)]
readme: Remove tracking image

The server for the tracking image for analytics is currently down,
therefore I found it convenient to remove the link in order to maintain our readme

3 years agoRevert "Remove credit from release notes"
digitalcraftsman [Thu, 23 Sep 2021 12:02:00 +0000 (14:02 +0200)]
Revert "Remove credit from release notes"

See b2eaf4c8c2e31aa1c1bc4a2c0061f661e01d2de1

3 years agoPass minification errors to the user
Paul Gottschling [Wed, 22 Sep 2021 18:54:40 +0000 (14:54 -0400)]
Pass minification errors to the user

Previously, *minifyTransformation.Transform suppressed the
error returned by t.m.Minify. This meant that when minification
returned an error, the error would not reach the user. Instead,
minification would silently fail. For example, if a JavaScript
file included a call to the Date constructor with:

new Date(2020, 04, 02)

The package that the minification library uses to parse JS files,
github.com/tdewolff/parse would return an error, since "04" would
be parsed as a legacy octal. However, the JS file would remain
un-minified with no error.

Fixing this is not as simple as replacing "_" with an "err" in
*minifyTransformation.Transform, however (though this is
necessary). If we only returned this error from Transform,
then hugolib.TestResourceMinifyDisabled would fail. Instead of
being a no-op, as TestResourceMinifyDisabled expects, using the
"minify" template function with a "disableXML=true" config
setting instead returns the error, "minifier does not exist for
mimetype."

The "minifier does not exist" error is returned because of the
way minifiers.New works. If the user's config disables
minification for a particular MIME type, minifiers.New does
not add it to the resulting Client's *minify.M. However, this
also means that when the "minify" template function is executed,
 a *resourceAdapter's transformations still add a minification.
When it comes time to call the minify.Minifier for a specific
MIME type via *M.MinifyMimetype, the github.com/tdewolff/minify
library throws the "does not exist" error for the missing MIME
type.

The solution was to change minifiers.New so, instead of skipping
a minifier for each disabled MIME type, it adds  a NoOpMinifier,
which simply copies the source to the destination without
minification. This means that when the "minify" template
function is used for a particular resource, and that resource's
MIME type has minification disabled, minification is genuinely
skipped, and does not result in an error.

In order to add this, I've fixed a possibly unwanted interaction
between minifiers.TestConfigureMinify and
hugolib.TestResourceMinifyDisabled. The latter disables
minification and expects minification to be a no-op. The former
disables minification and expects it to result in an error. The
only reason hugolib.TestResourceMinifyDisabled passes in the
original code is that the "does not exist" error is suppressed.
However, we shouldn't suppress minification errors, since they
can leave users perplexed. I've changed the test assertion in
minifiers.TestConfigureMinify to expect no errors and a no-op
if minification is disabled for a particular MIME type.

Fixes #8954

3 years agoClarify "precision" in currency format functions
Paul Gottschling [Thu, 2 Sep 2021 00:26:42 +0000 (20:26 -0400)]
Clarify "precision" in currency format functions

The documentation of the FormatAccounting and FormatCurrency
functions could be clearer in terms of how the precision param
works. This commit makes it more explicit that adding a precision
of < 2 will not format the return values to include fewer decimals.

Resolves #8858

3 years agobuild(deps): bump github.com/evanw/esbuild from 0.12.24 to 0.12.29
dependabot[bot] [Wed, 22 Sep 2021 08:11:53 +0000 (08:11 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.12.24 to 0.12.29

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.24 to 0.12.29.
- [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.12.24...v0.12.29)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoresources: Use default math/rand.Source for concurrency safety
Emmanuel T Odeke [Sun, 19 Sep 2021 10:18:30 +0000 (04:18 -0600)]
resources: Use default math/rand.Source for concurrency safety

The source from NewSource is documented not to be safe for
concurrency, and instead use the eefault source which is documented
as safe.

Fixes #8981

3 years agocommands: Make the error handling for the mod commands more lenient
Bjørn Erik Pedersen [Fri, 17 Sep 2021 15:16:34 +0000 (17:16 +0200)]
commands: Make the error handling for the mod commands more lenient

So it at least is possible to do a `hugo mod clean --all` if the cache is in a funky state.

3 years agomodules: Add some help text to the 'unknown revision' error
Bjørn Erik Pedersen [Fri, 17 Sep 2021 07:34:35 +0000 (09:34 +0200)]
modules: Add some help text to the 'unknown revision' error

I had a head scratching moment with this myself, so it's safe to say that others will.

See #6825

3 years agodeps: Update github.com/yuin/goldmark v1.4.0 => v1.4.1
Joe Mooring [Sun, 12 Sep 2021 17:10:47 +0000 (10:10 -0700)]
deps: Update github.com/yuin/goldmark v1.4.0 => v1.4.1

Fixes #8855

3 years agoreleaser: Prepare repository for 0.89.0-DEV
hugoreleaser [Sat, 4 Sep 2021 10:33:09 +0000 (10:33 +0000)]
releaser: Prepare repository for 0.89.0-DEV

[ci skip]

3 years agoreleaser: Add release notes to /docs for release of 0.88.1 v0.88.1
hugoreleaser [Sat, 4 Sep 2021 09:39:19 +0000 (09:39 +0000)]
releaser: Add release notes to /docs for release of 0.88.1

[ci skip]

3 years agoreleaser: Bump versions for release of 0.88.1
hugoreleaser [Sat, 4 Sep 2021 09:39:19 +0000 (09:39 +0000)]
releaser: Bump versions for release of 0.88.1

[ci skip]

3 years agoreleaser: Add release notes for 0.88.1
hugoreleaser [Sat, 4 Sep 2021 09:39:19 +0000 (09:39 +0000)]
releaser: Add release notes for 0.88.1
[ci skip]

3 years agoBump down again to Go 1.16.7 for the release builds
Bjørn Erik Pedersen [Sat, 4 Sep 2021 09:22:51 +0000 (11:22 +0200)]
Bump down again to Go 1.16.7 for the release builds

Note that this commit has nothing to do with "Hugo not working with Go 1.17", but this is the simplest fix of some build related issues in Hugo 0.88.0.

Updates #8952
Updates #8955

3 years agoreleaser: Prepare repository for 0.89.0-DEV
hugoreleaser [Thu, 2 Sep 2021 09:57:36 +0000 (09:57 +0000)]
releaser: Prepare repository for 0.89.0-DEV

[ci skip]

3 years agoreleaser: Add release notes to /docs for release of 0.88.0 v0.88.0
hugoreleaser [Thu, 2 Sep 2021 09:27:27 +0000 (09:27 +0000)]
releaser: Add release notes to /docs for release of 0.88.0

[ci skip]

3 years agoreleaser: Bump versions for release of 0.88.0
hugoreleaser [Thu, 2 Sep 2021 09:27:27 +0000 (09:27 +0000)]
releaser: Bump versions for release of 0.88.0

[ci skip]

3 years agoRelease 0.88.0
Bjørn Erik Pedersen [Thu, 2 Sep 2021 09:11:08 +0000 (11:11 +0200)]
Release 0.88.0

3 years agoUpdate 0.88.0-relnotes.md
Bjørn Erik Pedersen [Thu, 2 Sep 2021 09:10:40 +0000 (11:10 +0200)]
Update 0.88.0-relnotes.md

[ci skip]

3 years agoreleaser: Add release notes for 0.88.0
hugoreleaser [Thu, 2 Sep 2021 08:09:25 +0000 (08:09 +0000)]
releaser: Add release notes for 0.88.0

Rename to *-ready.md to continue.
[ci skip]

3 years agoRun go mod tidy
Bjørn Erik Pedersen [Wed, 1 Sep 2021 08:48:13 +0000 (10:48 +0200)]
Run go mod tidy

3 years agojs: Fix import order for ./foo when both ./foo.js and ./foo/index.js exists
Bjørn Erik Pedersen [Wed, 1 Sep 2021 07:07:29 +0000 (09:07 +0200)]
js: Fix import order for ./foo when both ./foo.js and ./foo/index.js exists

This is in line with how both Node and ESBuild's native import resolver does it.

The ambiguous situations above were discovered trying to build AlpineJS v3.

Note that the above was never an issue if you used `./foo.js` and similar to import the component.

Fixes #8945

3 years agocommands: Don't fail on template errors on go mod graph etc.
Bjørn Erik Pedersen [Tue, 31 Aug 2021 15:02:51 +0000 (17:02 +0200)]
commands: Don't fail on template errors on go mod graph etc.

Fixes #8942

3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.74.0 to 0.75.0
dependabot[bot] [Mon, 30 Aug 2021 08:19:16 +0000 (08:19 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.74.0 to 0.75.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.74.0 to 0.75.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.74.0...v0.75.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/frankban/quicktest from 1.13.0 to 1.13.1
dependabot[bot] [Tue, 24 Aug 2021 08:14:50 +0000 (08:14 +0000)]
build(deps): bump github.com/frankban/quicktest from 1.13.0 to 1.13.1

Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/evanw/esbuild from 0.12.22 to 0.12.24
dependabot[bot] [Mon, 30 Aug 2021 08:19:56 +0000 (08:19 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.12.22 to 0.12.24

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.22 to 0.12.24.
- [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.12.22...v0.12.24)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoAvoid failing with "module not found" for hugo mod init and similar
Bjørn Erik Pedersen [Tue, 31 Aug 2021 10:08:11 +0000 (12:08 +0200)]
Avoid failing with "module not found" for hugo mod init and similar

Fixes #8940

3 years agoUpdate to Go 1.17
Bjørn Erik Pedersen [Thu, 26 Aug 2021 15:24:52 +0000 (17:24 +0200)]
Update to Go 1.17

Go 1.17 now lazy-loads dependencies when `go.mod` is version `go17`. This does not work for us for new projects started with `hugo mod init`.

Before this commit, starting a project with Go 1.17 with `hugo mod init` and then start adding dependencies with transitive dependenies to `config.toml` would treat the transitive dependencies as new, and you would potentially get a too recent version of those.

Note that this does not effect existing projects, where all dependencies are already recorded in `go.mod`.

Fixes #8930

3 years agoRemove Pygments from snapcraft.yml
Anthony Fok [Wed, 25 Aug 2021 16:43:32 +0000 (10:43 -0600)]
Remove Pygments from snapcraft.yml

Pygments support was removed in Hugo v0.60.0

3 years agoRevert "build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0"
Bjørn Erik Pedersen [Mon, 23 Aug 2021 16:20:29 +0000 (18:20 +0200)]
Revert "build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0"

This reverts commit f70165242b98e3ee182fbac08bf2893a7f09e961.

Closes #8920

3 years agohighlight: Add tabindex when code is not highlighted
Helder Pereira [Sun, 22 Aug 2021 14:03:20 +0000 (15:03 +0100)]
highlight: Add tabindex when code is not highlighted

3 years agobuild(deps): bump github.com/evanw/esbuild from 0.12.17 to 0.12.22
dependabot[bot] [Sun, 22 Aug 2021 11:01:08 +0000 (11:01 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.12.17 to 0.12.22

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.17 to 0.12.22.
- [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.12.17...v0.12.22)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoFix it so disableKinds etc. does not get merged in from theme
Bjørn Erik Pedersen [Sun, 22 Aug 2021 09:57:37 +0000 (11:57 +0200)]
Fix it so disableKinds etc. does not get merged in from theme

Unless the merge strategy is set up to do so.

For `disableKinds` the current workaround is to make sure the project config has an entry, even if is empty:

```
disableKinds = []
```

Note that this issue only touches root, non-map config-values that either is not set in project config or in Hugo's defaults.

Fixes #8866

3 years agobuild(deps): bump golang.org/x/text from 0.3.6 to 0.3.7
dependabot[bot] [Wed, 11 Aug 2021 08:11:09 +0000 (08:11 +0000)]
build(deps): bump golang.org/x/text from 0.3.6 to 0.3.7

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.6...v0.3.7)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0
dependabot[bot] [Thu, 19 Aug 2021 08:16:27 +0000 (08:16 +0000)]
build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0

Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.4.9 to 1.5.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.4.9...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoPrevent minifier from removing quoutes around post-processed attributes
Bjørn Erik Pedersen [Thu, 19 Aug 2021 09:30:50 +0000 (11:30 +0200)]
Prevent minifier from removing quoutes around post-processed attributes

Fixes #8884

3 years agoRevert "commands: Avoid too many watch file handles causing the server to fail to...
Bjørn Erik Pedersen [Sat, 21 Aug 2021 14:32:20 +0000 (16:32 +0200)]
Revert "commands: Avoid too many watch file handles causing the server to fail to start"

This reverts commit 3f38c785b7208440e2a9dd9a80cb39d4ae23e676.

3 years agohighlight: Remove some pygments references
Helder Pereira [Sat, 21 Aug 2021 10:46:18 +0000 (11:46 +0100)]
highlight: Remove some pygments references

3 years agocommands: Avoid too many watch file handles causing the server to fail to start
Shiming Zhang [Thu, 19 Aug 2021 09:04:09 +0000 (17:04 +0800)]
commands: Avoid too many watch file handles causing the server to fail to start

Fixes #8904

3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.68.0 to 0.74.0
dependabot[bot] [Tue, 17 Aug 2021 08:21:42 +0000 (08:21 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.68.0 to 0.74.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.68.0 to 0.74.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.68.0...v0.74.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agodeps: Update github.com/spf13/cast v1.4.0 => v1.4.1
Bjørn Erik Pedersen [Mon, 16 Aug 2021 07:16:41 +0000 (09:16 +0200)]
deps: Update github.com/spf13/cast v1.4.0 => v1.4.1

Closes #8891

3 years agoImport time/tzdata on Windows
Bjørn Erik Pedersen [Sat, 14 Aug 2021 10:09:41 +0000 (12:09 +0200)]
Import time/tzdata on Windows

Updates #8892

3 years agoreleaser: Bump to Go 1.16.7
Bjørn Erik Pedersen [Tue, 10 Aug 2021 12:00:49 +0000 (14:00 +0200)]
releaser: Bump to Go 1.16.7

3 years agoRevert "tpl/time: Handle nil values in time.AsTime"
Bjørn Erik Pedersen [Tue, 10 Aug 2021 11:21:49 +0000 (13:21 +0200)]
Revert "tpl/time: Handle nil values in time.AsTime"

This reverts commit 3e11072892ca31bb76980ee38890a4bd92d83dfd.

3 years agotpl/time: Handle nil values in time.AsTime
Bjørn Erik Pedersen [Mon, 9 Aug 2021 16:44:35 +0000 (18:44 +0200)]
tpl/time: Handle nil values in time.AsTime

Closes #8865

3 years agoparser: Indent TOML tables
Bjørn Erik Pedersen [Wed, 4 Aug 2021 09:33:30 +0000 (11:33 +0200)]
parser: Indent TOML tables

Fixes #8850

3 years agoFix `lang.FormatPercent` description
Salim B [Tue, 3 Aug 2021 14:22:28 +0000 (14:22 +0000)]
Fix `lang.FormatPercent` description

Successor PR for https://github.com/gohugoio/hugoDocs/pull/1504

3 years agoreleaser: Prepare repository for 0.88.0-DEV
hugoreleaser [Tue, 3 Aug 2021 12:11:56 +0000 (12:11 +0000)]
releaser: Prepare repository for 0.88.0-DEV

[ci skip]

3 years agoreleaser: Add release notes to /docs for release of 0.87.0 v0.87.0
hugoreleaser [Tue, 3 Aug 2021 10:57:26 +0000 (10:57 +0000)]
releaser: Add release notes to /docs for release of 0.87.0

[ci skip]

3 years agoreleaser: Bump versions for release of 0.87.0
hugoreleaser [Tue, 3 Aug 2021 10:57:26 +0000 (10:57 +0000)]
releaser: Bump versions for release of 0.87.0

[ci skip]