]> git.maquefel.me Git - brevno-suite/hugo/log
brevno-suite/hugo
3 years agoreleaser: Prepare repository for 0.103.0-DEV
hugoreleaser [Thu, 1 Sep 2022 10:34:57 +0000 (10:34 +0000)]
releaser: Prepare repository for 0.103.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.102.3
hugoreleaser [Thu, 1 Sep 2022 10:16:19 +0000 (10:16 +0000)]
releaser: Bump versions for release of 0.102.3

[ci skip]

3 years agoFix shortcode parser regression with quoted param values
Bjørn Erik Pedersen [Thu, 1 Sep 2022 07:26:27 +0000 (09:26 +0200)]
Fix shortcode parser regression with quoted param values

This issue was introduced in `v0.102.0`.

In 223bf2800488ad5d38854bbb595d789bc35ebe32 we removed the byte source from the parsed page result, which
meant we had to preserve exact positioning for all elements. This introduced some new `TypeIgnore` tokens
which we, wrongly, assumed didn't matter where we put in the result slice (they should be ignored anyway).

But it seems that this broke the logic where we determine if it's positional or named params in the case
where the paramater value contains escaped quoutes.

This commit makes sure that these ignore tokens (the back slashes) are never sent back to the client, which is how it was before `v0.102.0`.

This commit also fixes some lost error information in that same commit.

Fixes #10236

3 years agodeps: Update github.com/tdewolff/minify/v2 v2.12.0 => v2.12.1
Joe Mooring [Wed, 31 Aug 2022 02:06:45 +0000 (19:06 -0700)]
deps: Update github.com/tdewolff/minify/v2 v2.12.0 => v2.12.1

Fixes #10230

3 years agosnap: Use "snapcraftctl set-grade"
Anthony Fok [Tue, 30 Aug 2022 09:52:16 +0000 (03:52 -0600)]
snap: Use "snapcraftctl set-grade"

This, together with 'snapcraftctl set-version", negates the need to
modify snap/snapcraft.yaml upon each release, so the corresponding code
is removed from releaser/releaser.go.

Also, vendorInfo is extended to include the snap version number.

See #10225

3 years agosnap: Use "snapcraftctl set-version"
Anthony Fok [Tue, 30 Aug 2022 05:14:22 +0000 (23:14 -0600)]
snap: Use "snapcraftctl set-version"

This allows the use of "git describe --tags" to recognize lightweight
version tags, and the removal of initial "v" in the hugo snap version.

See #10225

3 years agosnap: Make external dependencies actually work
Anthony Fok [Sat, 13 Aug 2022 17:29:01 +0000 (11:29 -0600)]
snap: Make external dependencies actually work

Git:
 - Set GIT_EXEC_PATH and include usr/lib/git-core so that git can find the
   git-remote-https helper (needed by e.g. "go mod download").

Go:
 - Put Go in its own snap part, and use stage-snaps instead of build-snaps
   so that it is included in the final snap.
 - Set GOCACHE to a writable directory. (In a previous commit,
   HOME is set to $SNAP_REAL_HOME which is unwritable.)

Hugo:
 - Patch config/security/securityConfig.go "[security.exec] osEnv" whitelist
   (during snap build) so that external dependencies can use the required
   environment variables to run properly from within the snap.

Asciidoctor:
 - Replace shebang line in asciidoctor so it can find the ruby executable.
 - Set RUBYLIB so that Ruby can find its libraries.
   Caveat/TODO: The Ruby version is hardcoded in our custom RUBYLIB.

Embedded Dart Sass:
 - Download from GitHub and install it, for amd64 and arm64 only.

Node.js:
 - Remove my incomplete include list so that npx is actually installed.
 - Set npm_config_{cache,init_module,userconfig} to writable locations.

Pandoc:
 - Set pandoc_datadir so that Pandoc can find its data files.

rst2html:
 - Install python3-docutils package for rst2html, rst2html5, etc.
 - Set PYTHONHOME so that Python can find its libraries.

Note that asciidoctor, pandoc and rst2html are not in Hugo’s default
"[security.exec] allow" whitelist, and the snap package does not change
that default, so they still needed to be whitelisted manually in
config.toml if necessary by the end user.

Special thanks to Joe Mooring (@jmooring) for meticulously diagnosing
the issue and providing a comprehensive test repository at
https://github.com/jmooring/hugo-snap-test without which I would not
have been able to understand and resolve the issue.

Fixes #9078

3 years agorelease: Add the releaser commits to the ignore list
Bjørn Erik Pedersen [Mon, 29 Aug 2022 14:29:45 +0000 (16:29 +0200)]
release: Add the releaser commits to the ignore list

3 years agorelease: Fix the Deb archives
Bjørn Erik Pedersen [Mon, 29 Aug 2022 09:47:37 +0000 (11:47 +0200)]
release: Fix the Deb archives

Fixes #10220

3 years agoreleaser: Prepare repository for 0.103.0-DEV
hugoreleaser [Sun, 28 Aug 2022 16:41:06 +0000 (16:41 +0000)]
releaser: Prepare repository for 0.103.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.102.0
hugoreleaser [Sun, 28 Aug 2022 16:29:34 +0000 (16:29 +0000)]
releaser: Bump versions for release of 0.102.0

[ci skip]

3 years agoAdd linux/arm64 extended to release setup
Bjørn Erik Pedersen [Fri, 5 Aug 2022 14:35:24 +0000 (16:35 +0200)]
Add linux/arm64 extended to release setup

Fixes #8257

3 years agolicense: Add copyright info
Bjørn Erik Pedersen [Sun, 28 Aug 2022 10:55:47 +0000 (12:55 +0200)]
license: Add copyright info

Closes #10218

3 years agobuild(deps): bump go.uber.org/atomic from 1.9.0 to 1.10.0
dependabot[bot] [Fri, 26 Aug 2022 16:49:52 +0000 (16:49 +0000)]
build(deps): bump go.uber.org/atomic from 1.9.0 to 1.10.0

Bumps [go.uber.org/atomic](https://github.com/uber-go/atomic) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/uber-go/atomic/releases)
- [Changelog](https://github.com/uber-go/atomic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/atomic/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: go.uber.org/atomic
  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/kyokomi/emoji/v2 from 2.2.9 to 2.2.10
dependabot[bot] [Fri, 26 Aug 2022 10:02:20 +0000 (10:02 +0000)]
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.9 to 2.2.10

Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.9 to 2.2.10.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.9...v2.2.10)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  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.97.0 to 0.98.0
dependabot[bot] [Fri, 26 Aug 2022 10:02:29 +0000 (10:02 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.97.0 to 0.98.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.97.0 to 0.98.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.97.0...v0.98.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/pelletier/go-toml/v2 v2.0.2 => v2.0.4
Bjørn Erik Pedersen [Fri, 26 Aug 2022 12:53:58 +0000 (14:53 +0200)]
deps: Update github.com/pelletier/go-toml/v2 v2.0.2 => v2.0.4

Closes #10210

3 years agobuild(deps): bump github.com/spf13/afero from 1.8.2 to 1.9.2
dependabot[bot] [Thu, 25 Aug 2022 10:29:57 +0000 (10:29 +0000)]
build(deps): bump github.com/spf13/afero from 1.8.2 to 1.9.2

Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.8.2 to 1.9.2.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.8.2...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  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/tdewolff/parse/v2 from 2.6.1 to 2.6.2
dependabot[bot] [Thu, 25 Aug 2022 10:30:04 +0000 (10:30 +0000)]
build(deps): bump github.com/tdewolff/parse/v2 from 2.6.1 to 2.6.2

Bumps [github.com/tdewolff/parse/v2](https://github.com/tdewolff/parse) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/tdewolff/parse/releases)
- [Commits](https://github.com/tdewolff/parse/compare/v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/parse/v2
  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/mattn/go-isatty from 0.0.14 to 0.0.16
dependabot[bot] [Tue, 23 Aug 2022 11:35:24 +0000 (11:35 +0000)]
build(deps): bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16

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

---
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/rogpeppe/go-internal from 1.8.1 to 1.9.0
dependabot[bot] [Tue, 23 Aug 2022 04:55:08 +0000 (04:55 +0000)]
build(deps): bump github.com/rogpeppe/go-internal from 1.8.1 to 1.9.0

Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  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/yuin/goldmark from 1.4.12 to 1.4.13
dependabot[bot] [Tue, 23 Aug 2022 09:09:08 +0000 (09:09 +0000)]
build(deps): bump github.com/yuin/goldmark from 1.4.12 to 1.4.13

Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.12 to 1.4.13.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.12...v1.4.13)

---
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 agobuild(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0
dependabot[bot] [Mon, 22 Aug 2022 22:05:18 +0000 (22:05 +0000)]
build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  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/tdewolff/minify/v2 from 2.11.10 to 2.12.0
dependabot[bot] [Mon, 11 Jul 2022 08:04:03 +0000 (08:04 +0000)]
build(deps): bump github.com/tdewolff/minify/v2 from 2.11.10 to 2.12.0

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.11.10 to 2.12.0.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.11.10...v2.12.0)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  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.14.43 to 0.15.5
dependabot[bot] [Wed, 17 Aug 2022 08:05:38 +0000 (08:05 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.14.43 to 0.15.5

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.43 to 0.15.5.
- [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.14.43...v0.15.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoreadme: Add Golang URL to Go links
Reece Russell [Mon, 22 Aug 2022 17:45:15 +0000 (18:45 +0100)]
readme: Add Golang URL to Go links

3 years agoUpdate README.md
Bjørn Erik Pedersen [Fri, 19 Aug 2022 17:15:58 +0000 (19:15 +0200)]
Update README.md

3 years agoUpdate README.md
Bjørn Erik Pedersen [Fri, 19 Aug 2022 17:12:43 +0000 (19:12 +0200)]
Update README.md

3 years agoUpdate README.md
Bjørn Erik Pedersen [Fri, 19 Aug 2022 17:12:04 +0000 (19:12 +0200)]
Update README.md

3 years agogithub: Use GitHub's Choco-Install function to retry installs
Anthony Fok [Sun, 14 Aug 2022 06:52:23 +0000 (00:52 -0600)]
github: Use GitHub's Choco-Install function to retry installs

Apparently, two instances of "choco install mingw" running simultaneously
(for go-version 1.18.x and 1.19.x) would often cause at least one of them
to fail to connect to SourceForge:

    ERROR: The remote file either doesn't exist, is unauthorized,
    or is forbidden for url
    'https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-10.X-with-ada/GCC-10.2.0-crt-8.0.0-with-ada-20201019.7z/download'.
    Exception calling "GetResponse" with "0" argument(s):
    "The request was aborted: Could not create SSL/TLS secure channel."

With Choco-Install however, it simply works every single time!

Thanks to keymanapp/api.keyman.com#156 for the great tip!

See the definition of the PowerShell Choco-Install function here:
https://github.com/actions/runner-images/blob/main/images/win/scripts/ImageHelpers/ChocoHelpers.ps1

3 years agocommon/hugio: One more fix for non-OS fs
Bjørn Erik Pedersen [Sat, 13 Aug 2022 17:22:45 +0000 (19:22 +0200)]
common/hugio: One more fix for non-OS fs

Note that these are only used with OS fs, so no practical bugs, but still-

3 years agocommon/hugio: Fix CopyDir when fs is not OS
Bjørn Erik Pedersen [Sat, 13 Aug 2022 16:26:16 +0000 (18:26 +0200)]
common/hugio: Fix CopyDir when fs is not OS

3 years agosnap: Delete obsolete custom x-nodejs plugins
Anthony Fok [Sat, 13 Aug 2022 03:39:25 +0000 (21:39 -0600)]
snap: Delete obsolete custom x-nodejs plugins

3 years agolivereload: Inject script without head or body tag
satotake [Sun, 7 Aug 2022 14:15:28 +0000 (23:15 +0900)]
livereload: Inject script without head or body tag

Currently, Hugo does not inject `livereload` script if html does not contain `<head>` or `<body>`. This sometimes happens if you create new sites without `theme` and it is hard to catch the cause soon.

This PR:

* Inject livereload script even if html does not include `<head>`, `<body>`, or `<html>`
    - Modern browsers execute scripts even if they are outside `<html>`
    - Some js frameworks (confirmed with vite) inject HRM script without `<html>` tag
* Append warning script to html if `<head>` or `<body>` is not in html
* Fix bug that livereload cannot be appended to the tags with attrs

Close #10105

3 years agoreleaser: Fat MacOS binaries
Bjørn Erik Pedersen [Wed, 3 Aug 2022 15:32:47 +0000 (17:32 +0200)]
releaser: Fat MacOS binaries

Closes #9131

3 years agoUpdate to Go 1.19
Bjørn Erik Pedersen [Wed, 3 Aug 2022 10:27:03 +0000 (12:27 +0200)]
Update to Go 1.19

Fixes #10145

3 years agomarkup/goldmark/codeblock: Fix attributes when no language identifier in CodeBlock
piyo [Wed, 3 Aug 2022 09:32:08 +0000 (18:32 +0900)]
markup/goldmark/codeblock: Fix attributes when no language identifier in CodeBlock

Fixes #10118

3 years agocommands: Fix embed in livereload.go
杨晴 [Mon, 1 Aug 2022 09:42:26 +0000 (17:42 +0800)]
commands: Fix embed in livereload.go

3 years agoUpdate README.md
Bjørn Erik Pedersen [Sun, 31 Jul 2022 13:41:42 +0000 (15:41 +0200)]
Update README.md

Updates #10136

4 years agoExternalise and embed livereload.js string
Takeshi Sato [Tue, 26 Jul 2022 11:51:08 +0000 (20:51 +0900)]
Externalise and embed livereload.js string

This is a small refactoring. `livereload/livereload.go` has a wide
column. Sometimes language server does not work because of it.
Create a new js file and embed it.

4 years agoCache when not found in LookupLayout
Bjørn Erik Pedersen [Wed, 13 Jul 2022 12:47:32 +0000 (14:47 +0200)]
Cache when not found in LookupLayout

Very visible when using the pprof mutex profiler.

```bash
name         old time/op    new time/op    delta
Baseline-10    58.4ms ± 1%    51.6ms ± 0%  -11.56%  (p=0.029 n=4+4)

name         old alloc/op   new alloc/op   delta
Baseline-10    64.3MB ± 0%    64.2MB ± 0%     ~     (p=0.114 n=4+4)

name         old allocs/op  new allocs/op  delta
Baseline-10      649k ± 0%      649k ± 0%     ~     (p=0.229 n=4+4)
```

4 years agoparser/pageparser: Don't store the byte slices
Bjørn Erik Pedersen [Thu, 7 Jul 2022 14:11:47 +0000 (16:11 +0200)]
parser/pageparser: Don't store the byte slices

On its own this change doesn't do any magic, but this is part of a bigger picture about making Hugo leaner in the
memory usage department.

4 years agoMake the baseline benchmark's test files stable
Bjørn Erik Pedersen [Thu, 30 Jun 2022 10:36:55 +0000 (12:36 +0200)]
Make the baseline benchmark's test files stable

And add some assertions.

4 years agoMerge commit 'bdf935d66c1f02dfc942a30e9fc00519bba3aacb'
Bjørn Erik Pedersen [Tue, 28 Jun 2022 18:51:33 +0000 (20:51 +0200)]
Merge commit 'bdf935d66c1f02dfc942a30e9fc00519bba3aacb'

4 years agoSquashed 'docs/' changes from 30f32a624..e5aa641a6
Bjørn Erik Pedersen [Tue, 28 Jun 2022 18:51:33 +0000 (20:51 +0200)]
Squashed 'docs/' changes from 30f32a624..e5aa641a6

e5aa641a6 remove erroneous foo
8307b474e Add hl_inline to highlight function documentation
8517b02d9 update GitHub 404 docs URL to prevent redirect
5c52c2715 remove aerobatic.com
3eb179558 Update syntax-highlighting.md
00cbe3f2f Check for nil Chroma .Aliases
45416515e netlify: Hugo 0.101.0
d5dcd1581 docs: Regen docshelper
4785e99b1 common: Add hugo.GoVersion
e679f1b7e resources/page: Add :slugorfilename attribute
f2cc72a1f Update spellcheck.yml (#1755)

git-subtree-dir: docs
git-subtree-split: e5aa641a629ce70de609a006fb9a57ee422922f5

4 years agoAccept vendor-specified build date if .git/ is unavailable
Anthony Fok [Tue, 28 Jun 2022 13:59:03 +0000 (07:59 -0600)]
Accept vendor-specified build date if .git/ is unavailable

Fixes #10053

4 years agosnap: Replace mage with "go build" and set VendorInfo=snap
Anthony Fok [Tue, 28 Jun 2022 10:09:50 +0000 (04:09 -0600)]
snap: Replace mage with "go build" and set VendorInfo=snap

4 years agosnap: Use interface names etc-gitconfig and gitconfig, Take 2
Anthony Fok [Mon, 27 Jun 2022 15:27:30 +0000 (09:27 -0600)]
snap: Use interface names etc-gitconfig and gitconfig, Take 2

as recommended by @alexmurray to keep consistency with other snaps; see
https://forum.snapcraft.io/t/system-files-and-personal-files-request-for-hugo/30598

I neglected to make the rename of system-gitconfig → etc-gitconfig and
user-gitconfig → gitconfig to the apps.plugs section in commit fd3953c,
hence this commit to fix the store upload scan failure:

  interface 'system-gitconfig' not found in base declaration
  interface 'user-gitconfig' not found in base declaration
  unknown plugs interface name reference 'system-gitconfig'
  unknown plugs interface name reference 'user-gitconfig'

Special thanks to Alex Murray and Igor Ljubuncic for approving the
system-files and personal-files request for Hugo.

Fixes #6226

4 years agoExtract the baseline benchmark to a test
Bjørn Erik Pedersen [Sun, 26 Jun 2022 07:56:01 +0000 (09:56 +0200)]
Extract the baseline benchmark to a test

4 years agoAdd a baseline benchmark
Bjørn Erik Pedersen [Sat, 25 Jun 2022 16:08:57 +0000 (18:08 +0200)]
Add a baseline benchmark

4 years agosnap: Use interface names etc-gitconfig and gitconfig
Anthony Fok [Fri, 24 Jun 2022 06:59:37 +0000 (00:59 -0600)]
snap: Use interface names etc-gitconfig and gitconfig

as recommended by @alexmurray to keep consistency with other snaps; see
https://forum.snapcraft.io/t/system-files-and-personal-files-request-for-hugo/30598/2

One closer step towards fixing #6226

4 years agoreleaser: Prepare repository for 0.102.0-DEV
hugoreleaser [Thu, 16 Jun 2022 07:51:58 +0000 (07:51 +0000)]
releaser: Prepare repository for 0.102.0-DEV

[ci skip]

4 years agoreleaser: Bump versions for release of 0.101.0
hugoreleaser [Thu, 16 Jun 2022 07:09:16 +0000 (07:09 +0000)]
releaser: Bump versions for release of 0.101.0

[ci skip]

4 years agoreleaser: Add release notes for 0.101.0
hugoreleaser [Thu, 16 Jun 2022 07:09:16 +0000 (07:09 +0000)]
releaser: Add release notes for 0.101.0
[ci skip]

4 years agobuild: Update to Go 1.18.3
Bjørn Erik Pedersen [Thu, 16 Jun 2022 06:27:08 +0000 (08:27 +0200)]
build: Update to Go 1.18.3

Fixes #9964

4 years agodocs: Regen docshelper
Bjørn Erik Pedersen [Thu, 16 Jun 2022 05:23:38 +0000 (07:23 +0200)]
docs: Regen docshelper

4 years agoSquashed 'docs/' changes from 96fdc246c..30f32a624
Bjørn Erik Pedersen [Thu, 16 Jun 2022 05:22:11 +0000 (07:22 +0200)]
Squashed 'docs/' changes from 96fdc246c..30f32a624

30f32a624 Update scss-sass.md
503130186 Update scss-sass.md
cbfaa6704 Remove references to outdated Blackfriday markdown processor (#1748)
e43948d26 netlify: Hugo 0.100.2
aaabe0ee9 Merge branch 'tempv0.100.2'
bc615f257 tpl/path: Add path.BaseName function
5dddbf95e Add Chinese translation for _documentation and _index.md
b1e4f3200 Add translation for search tools
23281633a Update introduction.md
3abb5fb5d netlify: Hugo 0.100.1
644ed3b01 Update faq.md
54f377051 Add some lines about resources.Copy
82cf08355 Remove most Blackfriday references
bfbe5aaf3 netlify: Update to Hugo 0.100.0
8b6f8577f docs: Regen CLI docs
858a5d39c docs: Regen docs helper
5037d504f Merge commit 'e4bfe59c4e043c92d3992587d8c64d264b262a22'
03ca7be5b Fix indentation in highlight shortcode

git-subtree-dir: docs
git-subtree-split: 30f32a62433a6d62b680a2dd874c72bb8fb0b728

4 years agoMerge commit '475f87f685439de0f907a9ffc29bfd1361eb1c59'
Bjørn Erik Pedersen [Thu, 16 Jun 2022 05:22:11 +0000 (07:22 +0200)]
Merge commit '475f87f685439de0f907a9ffc29bfd1361eb1c59'

4 years agomarkup/highlight: Add hl_inline option
Bjørn Erik Pedersen [Wed, 15 Jun 2022 11:51:29 +0000 (13:51 +0200)]
markup/highlight: Add hl_inline option

Closes #9442
Closes #9635
Closes #9638

4 years agodeps: Update github.com/alecthomas/chroma/v2 v2.1.0 => v2.2.0
Bjørn Erik Pedersen [Wed, 15 Jun 2022 11:46:44 +0000 (13:46 +0200)]
deps: Update github.com/alecthomas/chroma/v2 v2.1.0 => v2.2.0

4 years agobuild(deps): bump github.com/clbanning/mxj/v2 from 2.5.5 to 2.5.6
dependabot[bot] [Wed, 15 Jun 2022 10:12:07 +0000 (10:12 +0000)]
build(deps): bump github.com/clbanning/mxj/v2 from 2.5.5 to 2.5.6

Bumps [github.com/clbanning/mxj/v2](https://github.com/clbanning/mxj) from 2.5.5 to 2.5.6.
- [Release notes](https://github.com/clbanning/mxj/releases)
- [Commits](https://github.com/clbanning/mxj/compare/v2.5.5...v2.5.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 years agobuild(deps): bump github.com/pelletier/go-toml/v2 from 2.0.1 to 2.0.2
dependabot[bot] [Wed, 15 Jun 2022 10:14:11 +0000 (10:14 +0000)]
build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.1 to 2.0.2

Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 years agobuild(deps): bump golang.org/x/tools from 0.1.10 to 0.1.11
dependabot[bot] [Wed, 15 Jun 2022 08:39:10 +0000 (08:39 +0000)]
build(deps): bump golang.org/x/tools from 0.1.10 to 0.1.11

Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.10...v0.1.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 years agobuild(deps): bump github.com/tdewolff/minify/v2 from 2.11.5 to 2.11.10
dependabot[bot] [Wed, 15 Jun 2022 08:05:23 +0000 (08:05 +0000)]
build(deps): bump github.com/tdewolff/minify/v2 from 2.11.5 to 2.11.10

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.11.5 to 2.11.10.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.11.5...v2.11.10)

---
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>
4 years agobuild(deps): bump github.com/evanw/esbuild from 0.14.42 to 0.14.43
dependabot[bot] [Wed, 15 Jun 2022 08:38:57 +0000 (08:38 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.14.42 to 0.14.43

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.42 to 0.14.43.
- [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.14.42...v0.14.43)

---
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>
4 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.94.0 to 0.97.0
dependabot[bot] [Mon, 13 Jun 2022 08:03:37 +0000 (08:03 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.94.0 to 0.97.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.94.0 to 0.97.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.94.0...v0.97.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>
4 years agodeps: Udpate to github.com/alecthomas/chroma/v2
Bjørn Erik Pedersen [Thu, 26 May 2022 10:17:10 +0000 (12:17 +0200)]
deps: Udpate to github.com/alecthomas/chroma/v2

Fixes #9932
Fixes #9931

4 years agocommon: Add hugo.GoVersion
Khayyam Saleem [Mon, 30 May 2022 13:12:41 +0000 (09:12 -0400)]
common: Add hugo.GoVersion

Closes #9849. This enables `hugo.GoVersion` in templates to access the
version of Go that the Hugo binary was built with.

4 years agoresources: Panic on Copy of Resource with .Err
Bjørn Erik Pedersen [Mon, 13 Jun 2022 14:33:41 +0000 (16:33 +0200)]
resources: Panic on Copy of Resource with .Err

Fixes #10006

4 years agoresources/page: Add :slugorfilename attribute
Dawid Potocki [Mon, 13 Jun 2022 12:22:58 +0000 (00:22 +1200)]
resources/page: Add :slugorfilename attribute

Fixes #4739, #385

4 years agoRespect NO_COLOR
Bjørn Erik Pedersen [Mon, 13 Jun 2022 13:28:08 +0000 (15:28 +0200)]
Respect NO_COLOR

Fixes #10004

4 years agoreadme: Update dependency list
Andreas Deininger [Mon, 13 Jun 2022 11:16:45 +0000 (13:16 +0200)]
readme: Update dependency list

4 years agoFix relURL with leading slash when baseURL includes a subdirectory
Bjørn Erik Pedersen [Mon, 13 Jun 2022 07:52:02 +0000 (09:52 +0200)]
Fix relURL with leading slash when baseURL includes a subdirectory

Fixes #9994

4 years agojs: Resolve index.esm.js
Bjørn Erik Pedersen [Sun, 12 Jun 2022 16:42:53 +0000 (18:42 +0200)]
js: Resolve index.esm.js

Same logic as for `index.{js,ts...}` files applies; if both `index.esm.js` and `index.js` exists (unlikely), you need to use the name
with extension when importing, else the `index.js` will win.

Fixes #8631

4 years agoAdd animated GIF support
Bjørn Erik Pedersen [Sat, 11 Jun 2022 16:52:55 +0000 (18:52 +0200)]
Add animated GIF support

Note that this is for GIFs only (and not Webp).

Fixes #5030

4 years agoresources: Add a Gif source file to golden tests
Bjørn Erik Pedersen [Sun, 12 Jun 2022 13:14:27 +0000 (15:14 +0200)]
resources: Add a Gif source file to golden tests

4 years agoreleaser: Prepare repository for 0.101.0-DEV
hugoreleaser [Wed, 8 Jun 2022 11:07:37 +0000 (11:07 +0000)]
releaser: Prepare repository for 0.101.0-DEV

[ci skip]

4 years agoreleaser: Bump versions for release of 0.100.2
hugoreleaser [Wed, 8 Jun 2022 10:25:57 +0000 (10:25 +0000)]
releaser: Bump versions for release of 0.100.2

[ci skip]

4 years agoreleaser: Add release notes for 0.100.2
hugoreleaser [Wed, 8 Jun 2022 10:25:57 +0000 (10:25 +0000)]
releaser: Add release notes for 0.100.2
[ci skip]

4 years agoUpdate CONTRIBUTING.md
Bjørn Erik Pedersen [Tue, 7 Jun 2022 15:22:17 +0000 (17:22 +0200)]
Update CONTRIBUTING.md

4 years agoFix raw TOML dates in where/eq
Bjørn Erik Pedersen [Mon, 6 Jun 2022 07:48:40 +0000 (09:48 +0200)]
Fix raw TOML dates in where/eq

Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter
dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib.

Fixes #9979

4 years agodeps: Update to github.com/pelletier/go-toml/v2 v2.0.1
Anthony Fok [Sat, 4 Jun 2022 09:00:26 +0000 (03:00 -0600)]
deps: Update to github.com/pelletier/go-toml/v2 v2.0.1

4 years agotpl/path: Add path.BaseName function
Joe Mooring [Sat, 4 Jun 2022 20:40:32 +0000 (13:40 -0700)]
tpl/path: Add path.BaseName function

Closes #9973

4 years agolivereload: Use `X-Forwarded-Host` for Codespace
satotake [Sun, 5 Jun 2022 06:26:16 +0000 (15:26 +0900)]
livereload: Use `X-Forwarded-Host` for Codespace

Codespace has 2 types of usage

1. in browser
2. vscode on local computer

As long as you select 2 (on local), Hugo handles livereload expectedly.
But if you use it in browser, Hugo does not reload on file change, as #9936 said.

This issue happens because `CheckOrigin` always fails.
Remote server could rewrite request host name.
Fix this by respecting `X-Forwarded-Host` header during origin checking

After merging this, you can preview changes lively with codespaece in browser.

```sh
hugo server --liveReloadPort 443
```

Close #9936

4 years agohelpers: Fix panic with invalid defaultMarkdownHandler
Bjørn Erik Pedersen [Sat, 4 Jun 2022 15:39:34 +0000 (17:39 +0200)]
helpers: Fix panic with invalid defaultMarkdownHandler

Fixes #9968

4 years agoresources: Register MediaTypes before build
Paul van Brouwershaven [Fri, 3 Jun 2022 19:37:50 +0000 (21:37 +0200)]
resources: Register MediaTypes before build

Fixes #9971

4 years agoreleaser: Prepare repository for 0.101.0-DEV
hugoreleaser [Wed, 1 Jun 2022 10:54:16 +0000 (10:54 +0000)]
releaser: Prepare repository for 0.101.0-DEV

[ci skip]

4 years agoreleaser: Bump versions for release of 0.100.1
hugoreleaser [Wed, 1 Jun 2022 10:11:48 +0000 (10:11 +0000)]
releaser: Bump versions for release of 0.100.1

[ci skip]

4 years agoreleaser: Add release notes for 0.100.1
hugoreleaser [Wed, 1 Jun 2022 10:11:48 +0000 (10:11 +0000)]
releaser: Add release notes for 0.100.1
[ci skip]

4 years agoFix panic with markdownify/RenderString with shortcode on Page with no content file
Bjørn Erik Pedersen [Wed, 1 Jun 2022 08:19:05 +0000 (10:19 +0200)]
Fix panic with markdownify/RenderString with shortcode on Page with no content file

Fixes #9959

4 years agoreleaser: Prepare repository for 0.101.0-DEV
hugoreleaser [Tue, 31 May 2022 09:19:15 +0000 (09:19 +0000)]
releaser: Prepare repository for 0.101.0-DEV

[ci skip]

4 years agoreleaser: Bump versions for release of 0.100.0
hugoreleaser [Tue, 31 May 2022 08:37:12 +0000 (08:37 +0000)]
releaser: Bump versions for release of 0.100.0

[ci skip]

4 years agoreleaser: Add release notes for 0.100.0
hugoreleaser [Tue, 31 May 2022 08:37:12 +0000 (08:37 +0000)]
releaser: Add release notes for 0.100.0
[ci skip]

4 years agodocs: Regen CLI docs
Bjørn Erik Pedersen [Tue, 31 May 2022 08:24:01 +0000 (10:24 +0200)]
docs: Regen CLI docs

4 years agodocs: Regen docs helper
Bjørn Erik Pedersen [Tue, 31 May 2022 08:23:20 +0000 (10:23 +0200)]
docs: Regen docs helper

4 years agoMerge commit 'e4bfe59c4e043c92d3992587d8c64d264b262a22'
Bjørn Erik Pedersen [Tue, 31 May 2022 08:22:05 +0000 (10:22 +0200)]
Merge commit 'e4bfe59c4e043c92d3992587d8c64d264b262a22'

4 years agoSquashed 'docs/' changes from 2d9da3a56..96fdc246c
Bjørn Erik Pedersen [Tue, 31 May 2022 08:21:09 +0000 (10:21 +0200)]
Squashed 'docs/' changes from 2d9da3a56..96fdc246c

96fdc246c Fix outdated i18n warnings flag mention on the multilingual page
39d197345 netlify: Hugo 0.99.1
fafd5070e Typo: Vriables > Variables
348c4e237 Update postcss.md
924fa76b6 netlify: Hugo 0.99.0
bb3f02ac1 Merge branch 'tempv0.99.0'
bdd0b6eaf Update usage.md
f562ff99d postcss: Fix import error handling
5d73f215f docs: Regen CLI docs

git-subtree-dir: docs
git-subtree-split: 96fdc246cc901a4c4ce6a28bab681fda2cff355b

4 years agoFix indentation in highlight shortcode
Bjørn Erik Pedersen [Mon, 30 May 2022 18:42:46 +0000 (20:42 +0200)]
Fix indentation in highlight shortcode

This commit adds a new `.InnerDeindent` method to the shortcode context, which is `.Inner` with any
indendation removed. This is then used in the built-in `highlight` shortcode to prevent the extra
whitespace getting hightlighted.

Fixes #4717

4 years agoMake .RenderString render shortcodes
Bjørn Erik Pedersen [Sun, 29 May 2022 14:41:57 +0000 (16:41 +0200)]
Make .RenderString render shortcodes

Fixes #6703

4 years agoImprove shortcode indentation handling
Bjørn Erik Pedersen [Sat, 28 May 2022 11:18:50 +0000 (13:18 +0200)]
Improve shortcode indentation handling

* Record the leading whitespace (tabs, spaces) before the shortcode when parsing the page.
* Apply that indentation to the rendered result of shortcodes without inner content (where the user will apply indentation).

Fixes #9946