brevno-suite/hugo
3 years agoreleaser: Bump versions for release of 0.93.2 v0.93.2
hugoreleaser [Fri, 4 Mar 2022 12:21:48 +0000 (12:21 +0000)]
releaser: Bump versions for release of 0.93.2

[ci skip]

3 years agoreleaser: Add release notes for 0.93.2
hugoreleaser [Fri, 4 Mar 2022 12:21:48 +0000 (12:21 +0000)]
releaser: Add release notes for 0.93.2
[ci skip]

3 years agotpl/os: Revert readDir in theme behaviour
Bjørn Erik Pedersen [Fri, 4 Mar 2022 06:07:11 +0000 (07:07 +0100)]
tpl/os: Revert readDir in theme behaviour

Fixes #9599

3 years agomarkup/goldmark: Escape image alt attribute
Joe Mooring [Wed, 2 Mar 2022 17:30:57 +0000 (09:30 -0800)]
markup/goldmark: Escape image alt attribute

Fixes #9594

3 years agoreleaser: Prepare repository for 0.94.0-DEV vanilla/release-0.93.1
hugoreleaser [Wed, 2 Mar 2022 12:52:43 +0000 (12:52 +0000)]
releaser: Prepare repository for 0.94.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.93.1 v0.93.1
hugoreleaser [Wed, 2 Mar 2022 12:16:06 +0000 (12:16 +0000)]
releaser: Bump versions for release of 0.93.1

[ci skip]

3 years agoreleaser: Add release notes for 0.93.1
hugoreleaser [Wed, 2 Mar 2022 12:16:06 +0000 (12:16 +0000)]
releaser: Add release notes for 0.93.1
[ci skip]

3 years agotpl/transform: Fix it when template.HTML is passes as option to Hightlight
Bjørn Erik Pedersen [Wed, 2 Mar 2022 09:44:29 +0000 (10:44 +0100)]
tpl/transform: Fix it when template.HTML is passes as option to Hightlight

Fixes #9591

3 years agotpl/partials: Fix partialCached deadlock regression
Bjørn Erik Pedersen [Wed, 2 Mar 2022 09:04:29 +0000 (10:04 +0100)]
tpl/partials: Fix partialCached deadlock regression

This is a rollback of  0927cf739fee9646c7fb917965799d9acf080922

We cannot do that change until we either completes #9570 or possibly also use the new TryLock in GO 1.18.

Fixes #9588
Opens #4086

3 years agotpl/collections: Fix apply when function have Context as first arg
Bjørn Erik Pedersen [Tue, 1 Mar 2022 10:30:11 +0000 (11:30 +0100)]
tpl/collections: Fix apply when function have Context as first arg

As introduced in `partial` and `partialCached` in Hugo 0.93.0.

Fixes #9585

3 years agoMerge commit 'c1398b91a9f4c67876b31feb67516b252e654d3c'
Bjørn Erik Pedersen [Mon, 28 Feb 2022 09:37:27 +0000 (10:37 +0100)]
Merge commit 'c1398b91a9f4c67876b31feb67516b252e654d3c'

3 years agoSquashed 'docs/' changes from 93f7baf80..3f95a2ace
Bjørn Erik Pedersen [Mon, 28 Feb 2022 09:37:27 +0000 (10:37 +0100)]
Squashed 'docs/' changes from 93f7baf80..3f95a2ace

3f95a2ace Update merge function examples (#1662)
e8d518011 requires -> require typo fix (#1666)
e714066cb Update GitLab deployment instructions (#1661)
11946a218 update GitLab CI/CD yaml syntax (#1649)
3568ddc03 Add explicit `contentDir` to module-config-mounts (#1658)
798ac8f68 Add default value to isHTML
d376565ce Create extensions.json

git-subtree-dir: docs
git-subtree-split: 3f95a2ace37b04851905d72e4444020e30996787

3 years agoreleaser: Prepare repository for 0.94.0-DEV vanilla/release-0.93.0
hugoreleaser [Mon, 28 Feb 2022 09:05:08 +0000 (09:05 +0000)]
releaser: Prepare repository for 0.94.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.93.0 v0.93.0
hugoreleaser [Mon, 28 Feb 2022 08:30:42 +0000 (08:30 +0000)]
releaser: Bump versions for release of 0.93.0

[ci skip]

3 years agoreleaser: Add release notes for 0.93.0
hugoreleaser [Mon, 28 Feb 2022 08:30:42 +0000 (08:30 +0000)]
releaser: Add release notes for 0.93.0
[ci skip]

3 years agodocs: Regenerate docs helper
Bjørn Erik Pedersen [Mon, 28 Feb 2022 07:52:15 +0000 (08:52 +0100)]
docs: Regenerate docs helper

3 years agomarkup/highlight: Ignore HL_lines_parsed in the gen docs
Bjørn Erik Pedersen [Mon, 28 Feb 2022 07:30:29 +0000 (08:30 +0100)]
markup/highlight: Ignore  HL_lines_parsed in the gen docs

3 years agocod: Regen CLI docs
Bjørn Erik Pedersen [Mon, 28 Feb 2022 07:12:35 +0000 (08:12 +0100)]
cod: Regen CLI docs

3 years agotpl/diagrams: Rename the SVG accessor to Wrapped
Bjørn Erik Pedersen [Sun, 27 Feb 2022 17:28:35 +0000 (18:28 +0100)]
tpl/diagrams: Rename the SVG accessor to Wrapped

Not perfect, but it gets it in line with the other .Inner/.Wrapped combos.

3 years agomarkup/highlight: Rework the return value from HighlightCodeblock
Bjørn Erik Pedersen [Sun, 27 Feb 2022 16:57:28 +0000 (17:57 +0100)]
markup/highlight: Rework the return value from HighlightCodeblock

To make it possible to render it with a custom HTML ("<div>")  wrapper.

Updates #9573

3 years agotpl/transform: Add CanHighlight
Bjørn Erik Pedersen [Sun, 27 Feb 2022 16:09:11 +0000 (17:09 +0100)]
tpl/transform: Add CanHighlight

Closes #9573

3 years agoRename Codeowners() to CodeOwners()
Bjørn Erik Pedersen [Sun, 27 Feb 2022 18:40:07 +0000 (19:40 +0100)]
Rename Codeowners() to CodeOwners()

3 years agotpl/diagrams: Rename Body to Inner
Bjørn Erik Pedersen [Sun, 27 Feb 2022 12:36:58 +0000 (13:36 +0100)]
tpl/diagrams: Rename Body to Inner

This relates to #9577 – there's no concept a body element in SVG, so we might as well use an exsisting "Hugo term".

3 years agoCodeblockContext method renames
Bjørn Erik Pedersen [Sun, 27 Feb 2022 12:31:55 +0000 (13:31 +0100)]
CodeblockContext method renames

Fixes #9577

3 years agobuild(deps): bump github.com/tdewolff/minify/v2 from 2.9.29 to 2.10.0
dependabot[bot] [Fri, 25 Feb 2022 08:04:52 +0000 (08:04 +0000)]
build(deps): bump github.com/tdewolff/minify/v2 from 2.9.29 to 2.10.0

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.29 to 2.10.0.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.29...v2.10.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 agomarkup/goldmark: Adjust test for Windows
Bjørn Erik Pedersen [Sat, 26 Feb 2022 17:57:21 +0000 (18:57 +0100)]
markup/goldmark: Adjust test for Windows

3 years agomarkup/goldmark: Improve attributes vs options
Bjørn Erik Pedersen [Sat, 26 Feb 2022 16:24:10 +0000 (17:24 +0100)]
markup/goldmark: Improve attributes vs options

Fixes #9571

3 years agomarkup/goldmark: Add Position to CodeblockContext
Bjørn Erik Pedersen [Sat, 26 Feb 2022 11:52:06 +0000 (12:52 +0100)]
markup/goldmark: Add Position to CodeblockContext

But note that this is not particulary fast and the recommendad usage is error logging only.

Updates #9574

3 years ago markup/goldmark: Unify some code block tests
Bjørn Erik Pedersen [Sat, 26 Feb 2022 10:27:54 +0000 (11:27 +0100)]
 markup/goldmark: Unify some code block tests

3 years agoRemove the trailing new line in .Code
Bjørn Erik Pedersen [Sat, 26 Feb 2022 09:42:21 +0000 (10:42 +0100)]
Remove the trailing new line in .Code

Fixes #9572

3 years agomarkup/goldmark: Rename extension struct
Bjørn Erik Pedersen [Sat, 26 Feb 2022 09:32:14 +0000 (10:32 +0100)]
markup/goldmark: Rename extension struct

3 years agobuild(deps): bump github.com/gobuffalo/flect from 0.2.3 to 0.2.4
dependabot[bot] [Thu, 24 Feb 2022 22:00:52 +0000 (22:00 +0000)]
build(deps): bump github.com/gobuffalo/flect from 0.2.3 to 0.2.4

Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/gobuffalo/flect/releases)
- [Commits](https://github.com/gobuffalo/flect/compare/v0.2.3...v0.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agomarkup/goldmark: Use Ordinal to create default lineanchors
Bjørn Erik Pedersen [Fri, 25 Feb 2022 06:45:37 +0000 (07:45 +0100)]
markup/goldmark: Use Ordinal to create default lineanchors

The `Ordinal` starts at 0, so with a `hl-` prefix, this gives `hl-0-1` as a starting point.

Fixes #9567

3 years agobuild(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0
dependabot[bot] [Thu, 24 Feb 2022 22:00:31 +0000 (22:00 +0000)]
build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0

Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  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/sanity-io/litter from 1.5.1 to 1.5.2
dependabot[bot] [Thu, 24 Feb 2022 22:06:06 +0000 (22:06 +0000)]
build(deps): bump github.com/sanity-io/litter from 1.5.1 to 1.5.2

Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoMove the Goat template to the correct place
Bjørn Erik Pedersen [Thu, 24 Feb 2022 23:09:07 +0000 (00:09 +0100)]
Move the Goat template to the correct place

Updates #7765

3 years agobuild(deps): bump google.golang.org/api from 0.63.0 to 0.70.0
dependabot[bot] [Thu, 24 Feb 2022 16:26:26 +0000 (16:26 +0000)]
build(deps): bump google.golang.org/api from 0.63.0 to 0.70.0

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.63.0 to 0.70.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.63.0...v0.70.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoUpdate error message about failed menus in config.toml
RheingoldRiver [Thu, 24 Feb 2022 10:14:32 +0000 (04:14 -0600)]
Update error message about failed menus in config.toml

3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.85.0 to 0.90.0
dependabot[bot] [Thu, 24 Feb 2022 18:01:17 +0000 (18:01 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.85.0 to 0.90.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.85.0 to 0.90.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.85.0...v0.90.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 agoAdd test for line anchor attributes with code fences
Kaushal Modi [Thu, 24 Feb 2022 19:12:45 +0000 (14:12 -0500)]
Add test for line anchor attributes with code fences

Fixes https://github.com/gohugoio/hugo/issues/9385.

3 years agobuild(deps): bump github.com/evanw/esbuild from 0.14.22 to 0.14.23
dependabot[bot] [Thu, 24 Feb 2022 18:01:15 +0000 (18:01 +0000)]
build(deps): bump github.com/evanw/esbuild from 0.14.22 to 0.14.23

Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.22 to 0.14.23.
- [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.22...v0.14.23)

---
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 agoAdd Markdown diagrams and render hooks for code blocks
Bjørn Erik Pedersen [Thu, 17 Feb 2022 12:04:00 +0000 (13:04 +0100)]
Add Markdown diagrams and render hooks for code blocks

You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates #7765
Closes #9538
Fixes #9553
Fixes #8520
Fixes #6702
Fixes #9558

3 years agobuild(deps): bump github.com/aws/aws-sdk-go from 1.41.14 to 1.43.5
dependabot[bot] [Wed, 23 Feb 2022 21:45:43 +0000 (21:45 +0000)]
build(deps): bump github.com/aws/aws-sdk-go from 1.41.14 to 1.43.5

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.41.14 to 1.43.5.
- [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.41.14...v1.43.5)

---
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/google/go-cmp from 0.5.6 to 0.5.7
dependabot[bot] [Wed, 23 Feb 2022 21:51:53 +0000 (21:51 +0000)]
build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.7

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.6...v0.5.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoAdd support for CODEOWNERS
Marshall Cottrell [Fri, 18 Feb 2022 20:28:02 +0000 (14:28 -0600)]
Add support for CODEOWNERS

Fixes #9474

3 years agoRemove Viper as a dependency
Bjørn Erik Pedersen [Wed, 23 Feb 2022 19:55:16 +0000 (20:55 +0100)]
Remove Viper as a dependency

3 years agohelpers: Allow hyphens in UnicodeSanitize
Cameron Moore [Mon, 17 Jan 2022 22:33:47 +0000 (16:33 -0600)]
helpers: Allow hyphens in UnicodeSanitize

Improve handling of existing hyphens in input to UnicodeSanitize.
This commit accomplishes three things:

1. Explicitly allow hyphens
2. Avoid appending a hyphen if a preceeding hyphen is found
3. Avoid prepending a hyphen if a trailing hyphen is found

Fixes #7288

3 years agoChange `disqus_config` to `window.disqus_config`
Akimo [Wed, 23 Feb 2022 04:42:40 +0000 (13:42 +0900)]
Change `disqus_config` to `window.disqus_config`

3 years agodeps: Update github.com/spf13/cobra v1.2.1 => v1.3.0
Anthony Fok [Tue, 22 Feb 2022 17:47:21 +0000 (10:47 -0700)]
deps: Update github.com/spf13/cobra v1.2.1 => v1.3.0

3 years agoAdd page.Store
Bjørn Erik Pedersen [Tue, 22 Feb 2022 13:42:33 +0000 (14:42 +0100)]
Add page.Store

Fixes #9546

3 years agoAllow images to be cropped without being resized
John Elliott [Tue, 22 Feb 2022 16:50:23 +0000 (16:50 +0000)]
Allow images to be cropped without being resized

Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation.

Fixes #9499

3 years agocommands: Fix server panic regression
Bjørn Erik Pedersen [Mon, 21 Feb 2022 18:12:04 +0000 (19:12 +0100)]
commands: Fix server panic regression

And now with a proper server test.

Fixes #9518
Fixes #9530
Fixes #9539

3 years agomarkup/goldmark: Add BenchmarkCodeblocks
Bjørn Erik Pedersen [Mon, 21 Feb 2022 19:53:52 +0000 (20:53 +0100)]
markup/goldmark: Add BenchmarkCodeblocks

3 years agodeps: Update github.com/gohugoio/localescompressed v0.14.0 => v0.15.0
Joe Mooring [Fri, 18 Feb 2022 17:17:29 +0000 (09:17 -0800)]
deps: Update github.com/gohugoio/localescompressed v0.14.0 => v0.15.0

Fixes #9446

3 years agodeps: Update github.com/yuin/goldmark v1.4.4 => v1.4.7
Bjørn Erik Pedersen [Fri, 18 Feb 2022 20:18:57 +0000 (21:18 +0100)]
deps: Update github.com/yuin/goldmark v1.4.4 => v1.4.7

Closes #9397

3 years agomodules: Add modules.Workspace config for Go 1.18
Bjørn Erik Pedersen [Fri, 18 Feb 2022 11:43:59 +0000 (12:43 +0100)]
modules: Add modules.Workspace config for Go 1.18

Sets `GOWORK` env var for Go 1.18.

Fixes #9525

3 years agoUpdate stale.yml
Bjørn Erik Pedersen [Fri, 18 Feb 2022 10:43:35 +0000 (11:43 +0100)]
Update stale.yml

Updates #9522

3 years agoUpdate stale.yml
Bjørn Erik Pedersen [Fri, 18 Feb 2022 10:38:24 +0000 (11:38 +0100)]
Update stale.yml

Updates #9522

3 years agogithub: Configure stale to be run manually
Bjørn Erik Pedersen [Fri, 18 Feb 2022 10:31:57 +0000 (11:31 +0100)]
github: Configure stale to be run manually

Updates #9522

3 years agotpl/partials: Fix recently introduced deadlock in partials cache
Bjørn Erik Pedersen [Thu, 17 Feb 2022 15:51:19 +0000 (16:51 +0100)]
tpl/partials: Fix recently introduced deadlock in partials cache

The change in lock logic for `partialCached` in  0927cf739fee9646c7fb917965799d9acf080922 was naive as it didn't consider cached partials calling other cached partials.

This changeset may look on the large side for this particular issue, but it pulls in part of a working branch, introducing `context.Context` in the template execution.

Note that the context is only partially implemented in this PR, but the upcoming use cases will, as one example, include having access to the top "dot" (e.g. `Page`) all the way down into partials and shortcodes etc.

The earlier benchmarks rerun against master:

```bash
name              old time/op    new time/op    delta
IncludeCached-10    13.6ms ± 2%    13.8ms ± 1%    ~     (p=0.343 n=4+4)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    5.30MB ± 0%    5.35MB ± 0%  +0.96%  (p=0.029 n=4+4)

name              old allocs/op  new allocs/op  delta
IncludeCached-10     74.7k ± 0%     75.3k ± 0%  +0.77%  (p=0.029 n=4+4)
```

Fixes #9519

3 years agotpl/partials: Add some more partials to BenchmarkIncludeCached
Bjørn Erik Pedersen [Thu, 17 Feb 2022 15:45:59 +0000 (16:45 +0100)]
tpl/partials: Add some more partials to BenchmarkIncludeCached

3 years agodeps: Update github.com/evanw/esbuild v0.14.11 => v0.14.22
Bjørn Erik Pedersen [Thu, 17 Feb 2022 10:17:46 +0000 (11:17 +0100)]
deps: Update github.com/evanw/esbuild v0.14.11 => v0.14.22

3 years agotpl/partials: Make sure a cached partial is invoked only once
Bjørn Erik Pedersen [Wed, 16 Feb 2022 09:26:42 +0000 (10:26 +0100)]
tpl/partials: Make sure a cached partial is invoked only once

This commit revises the locking strategy for `partialCached`. We have added a benchmark that may be a little artificial, but it should at least show that we're not losing any performance over this:

```bash
name              old time/op    new time/op    delta
IncludeCached-10    12.2ms ± 2%    11.3ms ± 1%   -7.36%  (p=0.029 n=4+4)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    7.17MB ± 0%    5.09MB ± 0%  -29.00%  (p=0.029 n=4+4)

name              old allocs/op  new allocs/op  delta
IncludeCached-10      128k ± 1%       70k ± 0%  -45.42%  (p=0.029 n=4+4)
```

This commit also revises the template metrics hints logic a little, and add a test for it, which output is currently this:

```bash
 cumulative       average       maximum      cache  percent  cached  total
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
      163.334µs     163.334µs     163.334µs          0        0       0      1  index.html
       23.749µs       5.937µs      19.916µs         25       50       2      4  partials/dynamic1.html
        9.625µs       4.812µs        6.75µs        100       50       1      2  partials/static1.html
        7.625µs       7.625µs       7.625µs        100        0       0      1  partials/static2.html
```

Some notes:

* The duration now includes the cached invocations (which should be very short)
* A cached template gets executed once before it gets cached, so the "percent cached" will never be 100.

Fixes #4086
Fixes #9506

3 years agobuild(deps): bump github.com/rogpeppe/go-internal from 1.8.0 to 1.8.1
dependabot[bot] [Sat, 29 Jan 2022 12:56:40 +0000 (12:56 +0000)]
build(deps): bump github.com/rogpeppe/go-internal from 1.8.0 to 1.8.1

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

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  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/magefile/mage from 1.11.0 to 1.12.1
dependabot[bot] [Mon, 17 Jan 2022 08:03:18 +0000 (08:03 +0000)]
build(deps): bump github.com/magefile/mage from 1.11.0 to 1.12.1

Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.11.0 to 1.12.1.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.11.0...v1.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agomarkup/goldmark: Exclude event attributes from markdown render hook
Joe Mooring [Wed, 16 Feb 2022 18:56:23 +0000 (10:56 -0800)]
markup/goldmark: Exclude event attributes from markdown render hook

Fixes #9511

3 years agomarkup/goldmark: Fix mangling of headers/links in render hooks
Bjørn Erik Pedersen [Wed, 16 Feb 2022 12:44:09 +0000 (13:44 +0100)]
markup/goldmark: Fix mangling of headers/links in render hooks

```bash

name                    old time/op    new time/op    delta
SiteWithRenderHooks-10    11.9ms ± 1%    11.9ms ± 1%    ~     (p=0.486 n=4+4)

name                    old alloc/op   new alloc/op   delta
SiteWithRenderHooks-10    11.2MB ± 0%    11.3MB ± 0%  +0.16%  (p=0.029 n=4+4)

name                    old allocs/op  new allocs/op  delta
SiteWithRenderHooks-10      145k ± 0%      145k ± 0%  +0.14%  (p=0.029 n=4+4)
```

Fixes #9504

3 years agomarkup/goldmark: Add a render hook benchmark
Bjørn Erik Pedersen [Wed, 16 Feb 2022 12:30:53 +0000 (13:30 +0100)]
markup/goldmark: Add a render hook benchmark

Updates #9504

3 years agoFix BenchmarkCascadeTarget
Bjørn Erik Pedersen [Wed, 16 Feb 2022 12:23:43 +0000 (13:23 +0100)]
Fix BenchmarkCascadeTarget

3 years agometrics: Add cached count tracking
Cameron Moore [Tue, 30 Mar 2021 15:47:34 +0000 (10:47 -0500)]
metrics: Add cached count tracking

Track cached partial executions and display more useful info when
showing the hints output. Also group cache hints and counters together
to the right of the timing measurements.

Sample output:

     cumulative       average       maximum      cache  percent  cached  total
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
       2.6973ms     674.325µs       857.3µs          0        0       0      4  _internal/_default/rss.xml
       2.6295ms     657.375µs       861.3µs          0        0       0      4  _default/single.html
       1.2563ms     314.075µs       381.5µs          0        0       0      4  news/single.html
        799.2µs       399.6µs       573.3µs          0        0       0      2  _internal/_default/sitemap.xml
        667.3µs       66.73µs       238.6µs         84        0       0     10  partials/header.html
        656.7µs      328.35µs       459.4µs          0        0       0      2  _default/list.html
        479.7µs       47.97µs         158µs         92        0       0     10  partials/head.html
        323.3µs       323.3µs       323.3µs          0        0       0      1  _internal/alias.html
        200.7µs       200.7µs       200.7µs          0        0       0      1  _internal/_default/sitemapindex.xml
         36.1µs       6.016µs        32.6µs        100       33       2      6  partials/footer.html
         27.4µs        13.7µs        26.7µs          0        0       0      2  index.html

Fixes #8375

3 years agotpl: Remove TODO comment
Bjørn Erik Pedersen [Tue, 15 Feb 2022 22:39:54 +0000 (23:39 +0100)]
tpl: Remove TODO comment

3 years agoAdd --printUnusedTemplates
Bjørn Erik Pedersen [Tue, 15 Feb 2022 14:26:18 +0000 (15:26 +0100)]
Add --printUnusedTemplates

Fixes #9502

3 years agodeps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29
Joe Mooring [Fri, 14 Jan 2022 02:18:33 +0000 (18:18 -0800)]
deps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29

Fixes #9244
Fixes #9132
Fixes https://discourse.gohugo.io/t/36523

3 years agocommands: Rename --i18n-warnings to printI18nWarnings
Bjørn Erik Pedersen [Tue, 15 Feb 2022 12:03:36 +0000 (13:03 +0100)]
commands: Rename --i18n-warnings to printI18nWarnings

To get it in line with the others.

3 years agocommands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage
Bjørn Erik Pedersen [Tue, 15 Feb 2022 11:57:49 +0000 (12:57 +0100)]
commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage

To get it in line with the others.

3 years agodeps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0
Bjørn Erik Pedersen [Mon, 14 Feb 2022 12:27:17 +0000 (13:27 +0100)]
deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0

3 years agoFinally remove deprecated Page methods
Bjørn Erik Pedersen [Mon, 24 Jan 2022 10:15:54 +0000 (11:15 +0100)]
Finally remove deprecated Page methods

They have been deprecated for a very long time, first with a warning, then with an ERROR. Now they are removed.

Closes #4117

3 years agoSquashed 'docs/' changes from b8b20e9a2..93f7baf80
Bjørn Erik Pedersen [Mon, 14 Feb 2022 11:58:42 +0000 (12:58 +0100)]
Squashed 'docs/' changes from b8b20e9a2..93f7baf80

93f7baf80 netlify: Hugo 0.92.2
ecd8a6b6b Merge branch 'tempv0.92.2'
ee04caf9f Fix validation of Page Kind in cascade target map
3fce03ed2 Remove the "check" command
70ad71b25 Fix typo (#1651)
dfd1dc570 Fix internal link (#1650)
b5e0e0d38 Update rotten Fedora package link
78276390a Add missing word in types.md (#1645)
45eb945f8 Remove hugo gen autocomplete
2f84d0896 netlify: Hugo 0.92.1
b55f5773b Update complement.md
7013ee43e Remove deprecated RSSLink from page variables
1c3fb6ed3 Remove deprecated page vars (#1638)
9bd0af3ab Update union.md
4576487a0 Update symdiff.md
58f1b26c7 Update starter-kits.md (#1521)
285356c1d Move inline partials section (#1635)
4d08625d2 Improve directions for editing Win 10 path env var (#1632)
41d9c7804 Update page content (#1629)
d05536cad Removed unpaired quote character (#1630)
3b0fdcd88 netlify: Bump to Hugo 0.92.0
cdb068346 docs: Regenerate docshelper
778503ca8 Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb'
2d2401c91 docs: Add dependency table to maintainance page
6bc95c386 Add hugo.Deps
19d0b5e23 docs. Regen CLI docs
76a750d96 docs: Regenerate CLI docs
70156962a docs: Regenerate docshelper

git-subtree-dir: docs
git-subtree-split: 93f7baf80bd03176ad44701cd2452433d492ea0b

3 years agoMerge commit '230a495941b191af0bdaa7e2fc8c61607cb38207'
Bjørn Erik Pedersen [Mon, 14 Feb 2022 11:58:42 +0000 (12:58 +0100)]
Merge commit '230a495941b191af0bdaa7e2fc8c61607cb38207'

3 years agotpl: Use go:embed to load internal templates
Bjørn Erik Pedersen [Wed, 9 Feb 2022 17:29:49 +0000 (18:29 +0100)]
tpl: Use go:embed to load internal templates

Fixes #8297

3 years agoreleaser: Prepare repository for 0.93.0-DEV vanilla/release-0.92.2
hugoreleaser [Fri, 11 Feb 2022 14:54:18 +0000 (14:54 +0000)]
releaser: Prepare repository for 0.93.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.92.2 v0.92.2
hugoreleaser [Fri, 11 Feb 2022 14:17:39 +0000 (14:17 +0000)]
releaser: Bump versions for release of 0.92.2

[ci skip]

3 years agoreleaser: Add release notes for 0.92.2
hugoreleaser [Fri, 11 Feb 2022 14:17:38 +0000 (14:17 +0000)]
releaser: Add release notes for 0.92.2
[ci skip]

3 years agoAdd HUGO_ENV to the os/exec environment
Joe Mooring [Fri, 11 Feb 2022 00:00:54 +0000 (16:00 -0800)]
Add HUGO_ENV to the os/exec environment

Closes #9490

3 years agoSimplify some integration tests
Bjørn Erik Pedersen [Thu, 10 Feb 2022 18:49:20 +0000 (19:49 +0100)]
Simplify some integration tests

3 years agoFix validation of Page Kind in cascade target map
Joe Mooring [Sun, 30 Jan 2022 02:34:27 +0000 (18:34 -0800)]
Fix validation of Page Kind in cascade target map

Fixes #8888

3 years agoAdd another cascade benchmark
Bjørn Erik Pedersen [Thu, 10 Feb 2022 19:37:10 +0000 (20:37 +0100)]
Add another cascade benchmark

3 years agocommands: Fix server deadlock on config error
Bjørn Erik Pedersen [Thu, 10 Feb 2022 16:12:02 +0000 (17:12 +0100)]
commands: Fix server deadlock on config error

Fixes #9486

3 years agoExclude event attributes when rendering markdown
Joe Mooring [Fri, 4 Feb 2022 00:03:25 +0000 (16:03 -0800)]
Exclude event attributes when rendering markdown

Closes #9463

3 years agoRemove the "check" command
Joe Mooring [Tue, 1 Feb 2022 23:04:03 +0000 (15:04 -0800)]
Remove the "check" command

Closes #9454

3 years agoUpdate the application/javascript media type
Joe Mooring [Thu, 10 Feb 2022 06:51:37 +0000 (22:51 -0800)]
Update the application/javascript media type

Add jsm and mjs extensions.
Closes #9483

3 years agotpl/templates: Fix templates.Exist issue with base templates
Bjørn Erik Pedersen [Wed, 9 Feb 2022 14:51:44 +0000 (15:51 +0100)]
tpl/templates: Fix templates.Exist issue with base templates

Fixes #9477

3 years agoAdd a migration test helper
Bjørn Erik Pedersen [Wed, 9 Feb 2022 15:37:21 +0000 (16:37 +0100)]
Add a migration test helper

3 years agobabel: Port integration tests to their own package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 13:15:20 +0000 (14:15 +0100)]
babel: Port integration tests to their own package

3 years agojs: Port integration tests to its own package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 13:14:06 +0000 (14:14 +0100)]
js: Port integration tests to its own package

3 years agopostcss: Move integration test to its own package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 13:12:17 +0000 (14:12 +0100)]
postcss: Move integration test to its own package

3 years agominifier: Port integration tests to its package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 13:10:09 +0000 (14:10 +0100)]
minifier: Port integration tests to its package

3 years agotemplates: Port integration test to its package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 13:08:01 +0000 (14:08 +0100)]
templates: Port integration test to its package

3 years agotocss: Port integration tests to their package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 13:04:57 +0000 (14:04 +0100)]
tocss: Port integration tests to their package

3 years agoopenapi3: Port integration test into correct package
Bjørn Erik Pedersen [Wed, 9 Feb 2022 12:45:38 +0000 (13:45 +0100)]
openapi3: Port integration test into correct package