]> git.maquefel.me Git - brevno-suite/hugo/log
brevno-suite/hugo
2 years agoreleaser: Bump versions for release of 0.127.0
hugoreleaser [Wed, 5 Jun 2024 10:27:59 +0000 (10:27 +0000)]
releaser: Bump versions for release of 0.127.0

[ci skip]

2 years agoMisc remote HTTP/content adapter enhancements
Bjørn Erik Pedersen [Wed, 5 Jun 2024 07:21:45 +0000 (09:21 +0200)]
Misc remote HTTP/content adapter enhancements

* Recover from server errors
* Improve go adapter rebuilds when adding new content

See #12502
Fixes #12570

2 years agoresources: Fix spelling
Bjørn Erik Pedersen [Tue, 4 Jun 2024 16:48:39 +0000 (18:48 +0200)]
resources: Fix spelling

2 years agodeps: Upgrade github.com/gohugoio/httpcache v0.6.0 => v0.7.0
Bjørn Erik Pedersen [Tue, 4 Jun 2024 16:32:02 +0000 (18:32 +0200)]
deps: Upgrade github.com/gohugoio/httpcache v0.6.0 => v0.7.0

This was somehow missed when merging #12523

2 years agoAdd a HTTP cache for remote resources.
Bjørn Erik Pedersen [Fri, 17 May 2024 15:06:47 +0000 (17:06 +0200)]
Add a HTTP cache for remote resources.

Fixes #12502
Closes #11891

2 years agoreleaser: Prepare repository for 0.127.0-DEV
hugoreleaser [Sun, 2 Jun 2024 13:15:24 +0000 (13:15 +0000)]
releaser: Prepare repository for 0.127.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.126.3
hugoreleaser [Sun, 2 Jun 2024 13:02:43 +0000 (13:02 +0000)]
releaser: Bump versions for release of 0.126.3

[ci skip]

2 years agocontent adapter: Fix site.GetPage using the base part of the path
Bjørn Erik Pedersen [Sun, 2 Jun 2024 10:54:14 +0000 (12:54 +0200)]
content adapter: Fix site.GetPage using the base part of the path

Fixes #12561

2 years agoresources/page: Deprecate .Sites.First in favor of .Sites.Default
Joe Mooring [Sat, 18 May 2024 18:15:21 +0000 (11:15 -0700)]
resources/page: Deprecate .Sites.First in favor of .Sites.Default

Closes #12513

2 years agometrics: Increase maximum length of cumulative duration to 15
Razon Yang [Sat, 1 Jun 2024 15:48:43 +0000 (23:48 +0800)]
metrics: Increase maximum length of cumulative duration to 15

2 years agocontent adapter: Handle <!--more--> separator in content.value
Bjørn Erik Pedersen [Sat, 1 Jun 2024 08:27:10 +0000 (10:27 +0200)]
content adapter: Handle <!--more--> separator in content.value

Closes #12556

2 years agoreleaser: Try to fix the last failing step
Bjørn Erik Pedersen [Fri, 31 May 2024 07:03:09 +0000 (09:03 +0200)]
releaser: Try to fix the last failing step

2 years agoreleaser: Prepare repository for 0.127.0-DEV
Bjørn Erik Pedersen [Thu, 30 May 2024 16:58:47 +0000 (18:58 +0200)]
releaser: Prepare repository for 0.127.0-DEV

2 years agoreleaser: Bump versions for release of 0.126.2
hugoreleaser [Thu, 30 May 2024 16:07:40 +0000 (16:07 +0000)]
releaser: Bump versions for release of 0.126.2

[ci skip]

2 years agocontent adapter: Fix server crash on partial edit
Bjørn Erik Pedersen [Thu, 30 May 2024 12:58:05 +0000 (14:58 +0200)]
content adapter: Fix server crash on partial edit

Fixes #12538

2 years agoDelete .github/workflows/test-dart-sass-v1.yml
Bjørn Erik Pedersen [Thu, 30 May 2024 09:42:07 +0000 (11:42 +0200)]
Delete .github/workflows/test-dart-sass-v1.yml

That work flow was added to make sure Hugo kept on working for people using the old Dart Sass Protocol binary. We still do, but testing it on every PR build is too much now that all/most people should have upgraded.

2 years agocommands: Add shorthand flags -M (--renderToMemory) and -N (--navigateToChanged)
Bjørn Erik Pedersen [Thu, 30 May 2024 09:35:02 +0000 (11:35 +0200)]
commands: Add shorthand flags -M (--renderToMemory) and -N (--navigateToChanged)

Closes #12530

2 years agocontent adapter: Add support for menus in AddPage
Bjørn Erik Pedersen [Wed, 29 May 2024 11:23:36 +0000 (13:23 +0200)]
content adapter: Add support for menus in AddPage

Fixes #12507

2 years agocontent adapter: Fix issue with content starting out with a shortcode
Bjørn Erik Pedersen [Wed, 29 May 2024 10:59:57 +0000 (12:59 +0200)]
content adapter: Fix issue with content starting out with a shortcode

Fixes #12544

2 years agohugolib: Allow override of sitemap file name
Joe Mooring [Wed, 22 May 2024 18:07:45 +0000 (11:07 -0700)]
hugolib: Allow override of sitemap file name

Closes #12525

2 years agocommands: Improve list command
Joe Mooring [Sun, 19 May 2024 15:31:19 +0000 (08:31 -0700)]
commands: Improve list command

- Improve help text
- Add "kind" and "section" to CSV output
- Add a "published" subcommand to list content that is not draft,
  expired, or future.

Closes #12520

2 years agoconfig: Remove extraneous BuildConfig setting
Joe Mooring [Tue, 21 May 2024 11:13:16 +0000 (04:13 -0700)]
config: Remove extraneous BuildConfig setting

Closes #12519

2 years agotpl/tplimpl: Resolve render hook destinations with leading ./
Joe Mooring [Fri, 17 May 2024 22:41:18 +0000 (15:41 -0700)]
tpl/tplimpl: Resolve render hook destinations with leading ./

Closes #12514

2 years agoAlso warn about duplicate content paths with --printPathWarnings
Bjørn Erik Pedersen [Fri, 17 May 2024 08:30:54 +0000 (10:30 +0200)]
Also warn about duplicate content paths with --printPathWarnings

Closes #12511

2 years agoreleaser: Bump versions for release of 0.126.1
hugoreleaser [Wed, 15 May 2024 10:42:34 +0000 (10:42 +0000)]
releaser: Bump versions for release of 0.126.1

[ci skip]

2 years agoFix mixed case Page params handling in content adapters
Bjørn Erik Pedersen [Wed, 15 May 2024 09:59:03 +0000 (11:59 +0200)]
Fix mixed case Page params handling in content adapters

Fixes #12497

2 years agoFix paths with dots issue with content adapters
Bjørn Erik Pedersen [Wed, 15 May 2024 09:48:34 +0000 (11:48 +0200)]
Fix paths with dots issue with content adapters

Fixes #12493

2 years agoreleaser: Bump versions for release of 0.126.0
hugoreleaser [Tue, 14 May 2024 13:24:11 +0000 (13:24 +0000)]
releaser: Bump versions for release of 0.126.0

[ci skip]

2 years agodocs: Regen docshelper
Bjørn Erik Pedersen [Tue, 14 May 2024 12:46:16 +0000 (14:46 +0200)]
docs: Regen docshelper

2 years agotpl/tplimpl: Plainify title and description in twitter_cards.html
Joe Mooring [Thu, 25 Apr 2024 15:18:40 +0000 (08:18 -0700)]
tpl/tplimpl: Plainify title and description in twitter_cards.html

Closes #12433
Improves #10900

2 years agotpl/tplimpl: Plainify title and description in schema.html
Joe Mooring [Thu, 25 Apr 2024 14:58:28 +0000 (07:58 -0700)]
tpl/tplimpl: Plainify title and description in schema.html

Closes #12432

2 years agoresources/images: Handle NaN EXIF latitude and longitude
Joe Mooring [Tue, 14 May 2024 12:05:11 +0000 (05:05 -0700)]
resources/images: Handle NaN EXIF latitude and longitude

Fixes #12490

2 years agoCreate pages from _content.gotmpl
Bjørn Erik Pedersen [Sun, 17 Mar 2024 10:12:33 +0000 (11:12 +0100)]
Create pages from _content.gotmpl

Closes #12427
Closes #12485
Closes #6310
Closes #5074

2 years agocreate/skeletons: Remove superfluous language code fallback
Joe Mooring [Fri, 10 May 2024 22:30:17 +0000 (15:30 -0700)]
create/skeletons: Remove superfluous language code fallback

Closes #12479

2 years agotpl/tplimpl: Improve locale value in opengraph.html
Joe Mooring [Fri, 10 May 2024 22:25:20 +0000 (15:25 -0700)]
tpl/tplimpl: Improve locale value in opengraph.html

Closes #12480

2 years agobuild(deps): bump golang.org/x/net from 0.24.0 to 0.25.0
dependabot[bot] [Tue, 7 May 2024 08:05:55 +0000 (08:05 +0000)]
build(deps): bump golang.org/x/net from 0.24.0 to 0.25.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/net/compare/v0.24.0...v0.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump golang.org/x/image from 0.15.0 to 0.16.0
dependabot[bot] [Mon, 6 May 2024 08:10:43 +0000 (08:10 +0000)]
build(deps): bump golang.org/x/image from 0.15.0 to 0.16.0

Bumps [golang.org/x/image](https://github.com/golang/image) from 0.15.0 to 0.16.0.
- [Commits](https://github.com/golang/image/compare/v0.15.0...v0.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years ago livereload: Improve the livereload script build and update to v4.0.2
Bjørn Erik Pedersen [Thu, 2 May 2024 08:35:43 +0000 (10:35 +0200)]
 livereload: Improve the livereload script build and update to v4.0.2

This script has very infrequent updates, but just copy pasting the minified source creates some potential trust issues.

This JS will now be pulled from a Git version and both the unminified and minified version gets written to disk.

This way it should be easier to reason about changes in the future.

To upgrade, change the commit hash and run `mage generate`.

Closes #12451
Closes #6290

2 years agotpl/tplimpl: Retain query string and fragment in render-image.html
Joe Mooring [Tue, 7 May 2024 17:12:19 +0000 (10:12 -0700)]
tpl/tplimpl: Retain query string and fragment in render-image.html

Closes #12468

2 years agomarkup/goldmark: Support extras extension
Joe Mooring [Sat, 4 May 2024 01:06:10 +0000 (18:06 -0700)]
markup/goldmark: Support extras extension

Enables inclusion of these HTML elements in Markdown:

- Inserted Text (++inserted++)
- Mark Text (==marked==)
- Subscript (H~2~O)
- Superscript (1^st^)

2 years agoreleaser: Prepare repository for 0.126.0-DEV
hugoreleaser [Wed, 8 May 2024 15:00:23 +0000 (15:00 +0000)]
releaser: Prepare repository for 0.126.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.125.7
hugoreleaser [Wed, 8 May 2024 14:46:24 +0000 (14:46 +0000)]
releaser: Bump versions for release of 0.125.7

[ci skip]

2 years agodeps: Downgrade github.com/getkin/kin-openapi v0.124.0 => v0.123.0
Bjørn Erik Pedersen [Wed, 8 May 2024 14:20:16 +0000 (16:20 +0200)]
deps: Downgrade github.com/getkin/kin-openapi v0.124.0 => v0.123.0

We have received reports from users of Hugo's `openapi3.Unmarshal` about breaking behavior in the mentioned `kin-openapi` version, so revert for now, pending further investigation.

2 years agoreadme: Update Sponsors
Bjørn Erik Pedersen [Wed, 8 May 2024 09:37:56 +0000 (11:37 +0200)]
readme: Update Sponsors

2 years agoreleaser: Prepare repository for 0.126.0-DEV
hugoreleaser [Sun, 5 May 2024 11:05:28 +0000 (11:05 +0000)]
releaser: Prepare repository for 0.126.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.125.6
hugoreleaser [Sun, 5 May 2024 10:52:52 +0000 (10:52 +0000)]
releaser: Bump versions for release of 0.125.6

[ci skip]

2 years agoFix one more resource change eviction logic issue
Bjørn Erik Pedersen [Sun, 5 May 2024 08:44:35 +0000 (10:44 +0200)]
Fix one more resource change eviction logic issue

This is how we should have fixed #1239.

Fixes #12456

2 years agoMake the cache eviction logic for stale entities more robust
Bjørn Erik Pedersen [Fri, 3 May 2024 09:04:57 +0000 (11:04 +0200)]
Make the cache eviction logic for stale entities more robust

Fixes #12458

2 years agobuild(deps): bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2
dependabot[bot] [Thu, 2 May 2024 08:04:59 +0000 (08:04 +0000)]
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2

Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.1 to 2.2.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.2.1...v2.2.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>
2 years agoRun mage generate
Bjørn Erik Pedersen [Thu, 2 May 2024 08:43:25 +0000 (10:43 +0200)]
Run mage generate

2 years agoresources/page: Pull internal Page methods into its own interface
Bjørn Erik Pedersen [Thu, 2 May 2024 08:41:58 +0000 (10:41 +0200)]
resources/page: Pull internal Page methods into its own interface

So it doesn't get visible when passing it to `jsonify`.

2 years agoreleaser: Prepare repository for 0.126.0-DEV
hugoreleaser [Wed, 1 May 2024 15:36:00 +0000 (15:36 +0000)]
releaser: Prepare repository for 0.126.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.125.5
hugoreleaser [Wed, 1 May 2024 15:22:11 +0000 (15:22 +0000)]
releaser: Bump versions for release of 0.125.5

[ci skip]

2 years agoFix rebuilds on cascade deletes/renames
Bjørn Erik Pedersen [Wed, 1 May 2024 08:01:25 +0000 (10:01 +0200)]
Fix rebuilds on cascade deletes/renames

And also avoid reading sub directories on simple changes to branch `_index.md` files.

Fixes #12449

2 years agocommands: Print "Webserver is ..." right before "Total ..."
Bjørn Erik Pedersen [Sat, 20 Apr 2024 13:36:54 +0000 (15:36 +0200)]
commands: Print "Webserver is ..." right before "Total ..."

Also fix it so

* It's not printed when running `hugo -w`
* It'd printed for all kinds of rebuilds

Fixes #12384

2 years agoMake sure replaced pages gets marked as stale
Bjørn Erik Pedersen [Tue, 30 Apr 2024 16:25:55 +0000 (18:25 +0200)]
Make sure replaced pages gets marked as stale

Fixes #12436

2 years agoreleaser: Prepare repository for 0.126.0-DEV
hugoreleaser [Thu, 25 Apr 2024 13:40:37 +0000 (13:40 +0000)]
releaser: Prepare repository for 0.126.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.125.4
hugoreleaser [Thu, 25 Apr 2024 13:27:26 +0000 (13:27 +0000)]
releaser: Bump versions for release of 0.125.4

[ci skip]

2 years agocommands: Clarify that create or install a theme are two options
Peter van Dijk [Thu, 25 Apr 2024 12:38:22 +0000 (14:38 +0200)]
commands: Clarify that create or install a theme are two options

2 years agoconfig: Setups with only one active language can never be multihost
Bjørn Erik Pedersen [Thu, 25 Apr 2024 11:28:42 +0000 (13:28 +0200)]
config: Setups with only one active language can never be multihost

Fixes #12288

2 years agoFix rebuilds when running hugo -w
Bjørn Erik Pedersen [Thu, 25 Apr 2024 10:30:16 +0000 (12:30 +0200)]
Fix rebuilds when running hugo -w

This was partly broken in Hugo 0.123.0.

We have two internal config options that gets set from the CLI:

* Running; a web server is running
* Watching; either set via `hugo -w`  or `hugo server --watch=false`

Part of the change detection code wrongly used the `Running` as a flag when `Watching` would be the correct.

Fixes #12296

2 years agobuild(deps): bump github.com/tdewolff/minify/v2 from 2.20.19 to 2.20.20
dependabot[bot] [Thu, 25 Apr 2024 08:54:26 +0000 (08:54 +0000)]
build(deps): bump github.com/tdewolff/minify/v2 from 2.20.19 to 2.20.20

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.19 to 2.20.20.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.19...v2.20.20)

---
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>
2 years agotpl/tplimpl: Fix double-escaping in opengraph template
Joe Mooring [Wed, 24 Apr 2024 19:15:57 +0000 (12:15 -0700)]
tpl/tplimpl: Fix double-escaping in opengraph template

Closes #12418

2 years agoUse Apache License without modification
Bjørn Erik Pedersen [Tue, 23 Apr 2024 07:15:10 +0000 (09:15 +0200)]
Use Apache License without modification

Closes #12415

2 years agomarkup/goldmark: Fix data race in the hugocontext wrapper
Bjørn Erik Pedersen [Mon, 22 Apr 2024 16:12:49 +0000 (18:12 +0200)]
markup/goldmark: Fix data race in the hugocontext wrapper

The window for this to happen is very small, but it has been reported by Go's race detector (-race flag) in a tests once.

2 years agoDelete .hugo_build.lock
Bjørn Erik Pedersen [Mon, 22 Apr 2024 14:57:48 +0000 (16:57 +0200)]
Delete .hugo_build.lock

Added to Git by accident.

2 years agotpl: Escape .Title in built-in image and link render hooks
Bjørn Erik Pedersen [Mon, 22 Apr 2024 08:56:02 +0000 (10:56 +0200)]
tpl: Escape .Title in built-in image and link render hooks

Co-authored-by: Joe Mooring <joe@mooring.com>
2 years agotpl/tplimpl: Improve embedded templates
Joe Mooring [Mon, 22 Apr 2024 13:08:58 +0000 (06:08 -0700)]
tpl/tplimpl: Improve embedded templates

- Do not call the YouTube oEmbed API
- Do not include the Hugo version in RSS feeds

Closes #12396

2 years agoSECURITY.md: Update link to security model
Eric Anderson [Sun, 21 Apr 2024 15:50:56 +0000 (08:50 -0700)]
SECURITY.md: Update link to security model

The security model was moved in https://github.com/gohugoio/hugoDocs/pull/2495

2 years agomodules: Fix potential infinite loop in module collection
Bjørn Erik Pedersen [Mon, 22 Apr 2024 08:39:36 +0000 (10:39 +0200)]
modules: Fix potential infinite loop in module collection

Fixes #12407

2 years agoreleaser: Bump versions for release of 0.125.2
hugoreleaser [Sat, 20 Apr 2024 15:29:44 +0000 (15:29 +0000)]
releaser: Bump versions for release of 0.125.2

[ci skip]

2 years agoOnly add root sections to the section pages menu
Bjørn Erik Pedersen [Sat, 20 Apr 2024 14:51:56 +0000 (16:51 +0200)]
Only add root sections to the section pages menu

Fixes #12399

2 years agoFix partial rebuilds for SCSS fetched with GetMatch and similar
Bjørn Erik Pedersen [Sat, 20 Apr 2024 09:05:35 +0000 (11:05 +0200)]
Fix partial rebuilds for SCSS fetched with GetMatch and similar
Fixes #12395

2 years agocommands: Add gen chromastyles --lineNumbersTableStyle flag
Joe Mooring [Thu, 18 Apr 2024 19:04:47 +0000 (12:04 -0700)]
commands: Add gen chromastyles --lineNumbersTableStyle flag

For symmetry, also rename --linesStyle to --lineNumbersInlineStyle.

Closes #12393

2 years agoresources/images: Fix TestColorLuminance on s390x
Bjørn Erik Pedersen [Fri, 19 Apr 2024 09:21:50 +0000 (11:21 +0200)]
resources/images: Fix TestColorLuminance on s390x

2 years agocommands: Provide examples for chromastyles flags
Joe Mooring [Thu, 18 Apr 2024 19:16:36 +0000 (12:16 -0700)]
commands: Provide examples for chromastyles flags

Closes #12387

2 years agoreleaser: Prepare repository for 0.126.0-DEV
hugoreleaser [Thu, 18 Apr 2024 08:34:20 +0000 (08:34 +0000)]
releaser: Prepare repository for 0.126.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.125.1
hugoreleaser [Thu, 18 Apr 2024 08:21:19 +0000 (08:21 +0000)]
releaser: Bump versions for release of 0.125.1

[ci skip]

2 years agotpl: Use erroridf for remote YouTube errors
Bjørn Erik Pedersen [Wed, 17 Apr 2024 12:22:38 +0000 (14:22 +0200)]
tpl: Use erroridf for remote YouTube errors

So they can be silenced.

Fixes #12383

2 years agobuild: Fix `GLIBC_2.29' not found issue
Bjørn Erik Pedersen [Wed, 17 Apr 2024 10:04:00 +0000 (12:04 +0200)]
build: Fix `GLIBC_2.29' not found issue

Closes #12381

2 years agoreleaser: Prepare repository for 0.126.0-DEV
hugoreleaser [Tue, 16 Apr 2024 15:21:02 +0000 (15:21 +0000)]
releaser: Prepare repository for 0.126.0-DEV

[ci skip]

2 years agoreleaser: Bump versions for release of 0.125.0
hugoreleaser [Tue, 16 Apr 2024 15:04:41 +0000 (15:04 +0000)]
releaser: Bump versions for release of 0.125.0

[ci skip]

2 years agodocs: Regen docshelper
Bjørn Erik Pedersen [Tue, 16 Apr 2024 10:08:28 +0000 (12:08 +0200)]
docs: Regen docshelper

2 years agoFix server rebuilds when adding a content file on Linux
Bjørn Erik Pedersen [Tue, 16 Apr 2024 07:32:08 +0000 (09:32 +0200)]
Fix server rebuilds when adding a content file on Linux

Fixes #12362

2 years agobuild(deps): bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1
dependabot[bot] [Mon, 15 Apr 2024 09:00:48 +0000 (09:00 +0000)]
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1

Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.0 to 2.2.1.
- [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.2.0...v2.2.1)

---
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>
2 years agoAdd Luminance to Color
Bjørn Erik Pedersen [Mon, 15 Apr 2024 08:09:25 +0000 (10:09 +0200)]
Add Luminance to Color

To sort an image's colors from darkest to lightest, you can then do:

```handlebars
{{ {{ $colorsByLuminance := sort $image.Colors "Luminance" }}
```

This uses the formula defined here: https://www.w3.org/TR/WCAG21/#dfn-relative-luminance

Fixes #10450

2 years agohugolib: Add an asciidoc rebuild test case
Bjørn Erik Pedersen [Mon, 15 Apr 2024 13:48:42 +0000 (15:48 +0200)]
hugolib: Add an asciidoc rebuild test case

See #12375

2 years agoPass .RenderShortcodes' Page to render hooks as .PageInner
Bjørn Erik Pedersen [Thu, 11 Apr 2024 15:46:18 +0000 (17:46 +0200)]
Pass .RenderShortcodes' Page to render hooks as .PageInner

The main use case for this is to resolve links and resources (e.g. images) relative to the included `Page`.

A typical `include` would similar to this:

```handlebars
{{ with site.GetPage (.Get 0) }}
  {{ .RenderShortcodes }}
{{ end }}
```

And when used in a Markdown file:

```markdown
{{% include "/posts/p1" %}}
```

Any render hook triggered while rendering `/posts/p1` will get `/posts/p1` when calling `.PageInner`.

Note that

* This is only relevant for shortcodes included with `{{%` that calls `.RenderShortcodes`.
* `.PageInner` is available in all render hooks that, before this commit, received `.Page`.
* `.PageInner` will fall back to the value of `.Page` if not relevant and will always have a value.

Fixes #12356

2 years agobuild(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
dependabot[bot] [Sun, 14 Apr 2024 14:23:53 +0000 (14:23 +0000)]
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0

Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agohelpers: Fix TrimShortHTML when used with AsciiDoc content
Joe Mooring [Sun, 14 Apr 2024 04:17:39 +0000 (21:17 -0700)]
helpers: Fix TrimShortHTML when used with AsciiDoc content

Fixes #12369

2 years agogithub: Add a "free space" step on Ubuntu
Bjørn Erik Pedersen [Sun, 14 Apr 2024 14:13:44 +0000 (16:13 +0200)]
github: Add a "free space" step on Ubuntu

2 years agohelpers: Add BenchmarkTrimShortHTML
Bjørn Erik Pedersen [Sun, 14 Apr 2024 13:54:49 +0000 (15:54 +0200)]
helpers: Add BenchmarkTrimShortHTML

2 years agogithub: Update actions
Bjørn Erik Pedersen [Sun, 14 Apr 2024 11:14:22 +0000 (13:14 +0200)]
github: Update actions

2 years agogithub: Format GitHub actions files
Bjørn Erik Pedersen [Sun, 14 Apr 2024 11:10:43 +0000 (13:10 +0200)]
github: Format GitHub actions files

2 years agohugolib: Display server address after each rebuild
Joe Mooring [Sat, 13 Apr 2024 16:22:19 +0000 (09:22 -0700)]
hugolib: Display server address after each rebuild

Closes #12359

2 years agoresources/page: Add taxonomies Page method
Joe Mooring [Thu, 11 Apr 2024 19:42:57 +0000 (12:42 -0700)]
resources/page: Add taxonomies Page method

Closes #12316

2 years agocommands: Adjust completions
Bjørn Erik Pedersen [Thu, 11 Apr 2024 12:40:34 +0000 (14:40 +0200)]
commands: Adjust completions

2 years agocompletion: Improve existing argument completions, add many more
Ville Skyttä [Sun, 7 Apr 2024 20:33:17 +0000 (20:33 +0000)]
completion: Improve existing argument completions, add many more

Do not offer filenames to arguments not taking one, complete arguments
of options taking resource kinds, directory names, --logLevel, release
--step, config and new --format.

As an internal refactoring, use higher level functions to set flag
completions.  SetAnnotation works, but is more verbose than
alternatives, and uses bash specific wording.

While at it, move setting completions next to flag definitions
consistently.

Remove superfluous --destination completer setting, which is already
set elsewhere.

2 years agoUpgrade to Go 1.22.2
Bjørn Erik Pedersen [Thu, 11 Apr 2024 13:14:28 +0000 (15:14 +0200)]
Upgrade to Go 1.22.2

Closes #12351

2 years agobuild(deps): bump golang.org/x/tools from 0.19.0 to 0.20.0
dependabot[bot] [Thu, 11 Apr 2024 11:31:33 +0000 (11:31 +0000)]
build(deps): bump golang.org/x/tools from 0.19.0 to 0.20.0

Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.19.0...v0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>