]> git.maquefel.me Git - brevno-suite/hugo/log
brevno-suite/hugo
3 years agobuild(deps): bump github.com/tdewolff/parse/v2 from 2.6.4 to 2.6.5
dependabot[bot] [Sun, 5 Feb 2023 19:23:07 +0000 (19:23 +0000)]
build(deps): bump github.com/tdewolff/parse/v2 from 2.6.4 to 2.6.5

Bumps [github.com/tdewolff/parse/v2](https://github.com/tdewolff/parse) from 2.6.4 to 2.6.5.
- [Release notes](https://github.com/tdewolff/parse/releases)
- [Commits](https://github.com/tdewolff/parse/compare/v2.6.4...v2.6.5)

---
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.16 to 0.0.17
dependabot[bot] [Mon, 27 Feb 2023 08:57:42 +0000 (08:57 +0000)]
build(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17

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

---
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 golang.org/x/image
dependabot[bot] [Mon, 27 Feb 2023 08:57:47 +0000 (08:57 +0000)]
build(deps): bump golang.org/x/image

Bumps [golang.org/x/image](https://github.com/golang/image) from 0.0.0-20211028202545-6944b10bf410 to 0.5.0.
- [Release notes](https://github.com/golang/image/releases)
- [Commits](https://github.com/golang/image/commits/v0.5.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>
3 years agoRemove unused temp directory
Oleksandr Redko [Thu, 23 Feb 2023 19:46:42 +0000 (21:46 +0200)]
Remove unused temp directory

3 years agoexif: Return the proper exposure time value in some special cases
WaltCuller [Sun, 26 Feb 2023 10:19:49 +0000 (18:19 +0800)]
exif: Return the proper exposure time value in some special cases

Return value in float64 if exposure time is int or greater than 1, otherwise return in fraction.

Fixes #10738

3 years agoAdd a page template func
Bjørn Erik Pedersen [Sat, 25 Feb 2023 08:24:59 +0000 (09:24 +0100)]
Add a page template func

Fixes #9339

3 years agodartsass: Import CSS without extension at compile time
Joe Mooring [Fri, 24 Feb 2023 00:23:36 +0000 (16:23 -0800)]
dartsass: Import CSS without extension at compile time

Applicable to Dart Sass only:

- Sass imports with the .css extension indicate a plain CSS @import.
- Sass imports without the .css extension are imported at compile time.

Fixes #10592

3 years agoSplit parse and render for Goldmark
Bjørn Erik Pedersen [Fri, 24 Feb 2023 06:23:10 +0000 (07:23 +0100)]
Split parse and render for Goldmark

This also speeds up situations where you only need the fragments/toc and not the rendered content, e.g. Related
with fragments type indexing:

```bash

name            old time/op    new time/op    delta
RelatedSite-10    12.3ms ± 2%    10.7ms ± 1%  -12.95%  (p=0.029 n=4+4)

name            old alloc/op   new alloc/op   delta
RelatedSite-10    38.6MB ± 0%    38.2MB ± 0%   -1.08%  (p=0.029 n=4+4)

name            old allocs/op  new allocs/op  delta
RelatedSite-10      117k ± 0%      115k ± 0%   -1.36%  (p=0.029 n=4+4)
```

Fixes #10750

3 years agorelated: Add config option cardinalityThreshold
Bjørn Erik Pedersen [Thu, 23 Feb 2023 14:20:31 +0000 (15:20 +0100)]
related: Add config option cardinalityThreshold

Fixes #10744

3 years ago docs: Another fix related docs example
Bjørn Erik Pedersen [Thu, 23 Feb 2023 10:09:55 +0000 (11:09 +0100)]
 docs: Another fix related docs example

3 years agodocs: Fix related docs example
Bjørn Erik Pedersen [Thu, 23 Feb 2023 09:54:30 +0000 (10:54 +0100)]
docs: Fix related docs example

3 years agobuild(deps): bump golang.org/x/net from 0.4.0 to 0.7.0
dependabot[bot] [Tue, 21 Feb 2023 16:59:41 +0000 (16:59 +0000)]
build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.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>
3 years agoFix shortcode error when closing without .Inner
Bjørn Erik Pedersen [Thu, 23 Feb 2023 07:38:51 +0000 (08:38 +0100)]
Fix shortcode error when closing without .Inner

Fixes #10672

3 years agoThrow an error when shortcode is expected to be closed
Bjørn Erik Pedersen [Thu, 23 Feb 2023 07:08:17 +0000 (08:08 +0100)]
Throw an error when shortcode is expected to be closed

Fixes #10675

3 years agoAdd some shortcode testcases
Bjørn Erik Pedersen [Tue, 31 Jan 2023 08:01:43 +0000 (09:01 +0100)]
Add some shortcode testcases

Closes #10671

3 years agosass: Remove some unused leftover code
Bjørn Erik Pedersen [Thu, 23 Feb 2023 06:57:53 +0000 (07:57 +0100)]
sass: Remove some unused leftover code

3 years agoresources/sass: Remove debug statements
Joe Mooring [Wed, 22 Feb 2023 20:09:28 +0000 (12:09 -0800)]
resources/sass: Remove debug statements

Closes #10470

3 years agoMerge commit 'cf591b7c0c598d34896709db6d28598da37e3ff6'
Bjørn Erik Pedersen [Thu, 23 Feb 2023 06:52:04 +0000 (07:52 +0100)]
Merge commit 'cf591b7c0c598d34896709db6d28598da37e3ff6'

3 years agoSquashed 'docs/' changes from 1214f6ffb..36dd5483f
Bjørn Erik Pedersen [Thu, 23 Feb 2023 06:52:04 +0000 (07:52 +0100)]
Squashed 'docs/' changes from 1214f6ffb..36dd5483f

36dd5483f Clarify placement of 404 template
6f0a5f3f0 Update urls.Parse.md
c8070e578 Remove reference to Internet Explorer conditional comments (#1975)
3e3458f09 Describe default source map behavior for js.build (#1974)
08c9ed09a Simplify ordinal abbreviation example... (#1970)
b5aa8d598 docs(markdownify): mention a context limitation (#1968)
596af47f5 Fixing typo in configuration.md doc (#1966)
c47cadfcb Fix `hardWraps` config spelling (#1964)
5739a174e Add detail to tabWidth highlighting option
73a4bcd1f doc: Add hugo-lyra search engine (#1959)
6cc9ebdfd Update uniq function example (#1963)
686a65cf6 Update uniq.md
096f794d0 Update uniq.md
914ca0c38 remove `version` from SVG example (#1957)
58347d41f Update theme
7c806371f Fix 404 error for CloudCannon community learn docs (#1955)
58e42b03d Update theme
fd0385ee2 Update theme
513b7a43a Update findRe.md
4d39137ef Update configuration.md
b1c3b58a7 Update configuration.md
f827cce8d Update configuration.md
3d72ed8fb netlify: Hugo 0.110.0
e6f969c87 Merge branch 'feat/config-rename'
4c0b5a0b5 dos: Regen CLI docs
05d9db705 docs: Regen docshelper
f73bdb6e5 Merge commit 'ef6f101e75256c3bb88a6f1f3b5c1273bf8d7382'
e83141f88 Format config
4cadf795e Rename config.toml -> hugo.toml
c8aa8617f Move config/_default/config.toml -> config.toml
2943c031a Add fill HTTP Response info into .Data in resources.GetRemote

git-subtree-dir: docs
git-subtree-split: 36dd5483fb8efb6db4488bbaca5f6ac855f8ffea

3 years agopage: Move the cache double check right after the lock
Bjørn Erik Pedersen [Wed, 22 Feb 2023 20:24:41 +0000 (21:24 +0100)]
page: Move the cache double check right after the lock

3 years agopage: Add some concurrency to the building of the related page index
Bjørn Erik Pedersen [Wed, 22 Feb 2023 17:37:46 +0000 (18:37 +0100)]
page: Add some concurrency to the building of the related page index

But only in the case where we know that we will need to access the Page fragments/tableofcontents.

In normal situations this will spread naturally across the CPU cores, but not in the situation where
`site.RegularPages.Related` gets called as part of e.g. the single template.

```bash
name            old time/op    new time/op    delta
RelatedSite-10    18.0ms ± 2%    11.9ms ± 1%  -34.17%  (p=0.029 n=4+4)

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

name            old allocs/op  new allocs/op  delta
RelatedSite-10      117k ± 0%      117k ± 0%   +0.23%  (p=0.029 n=4+4)
```

See #10711

3 years agorelated: Adjust benchmark
Bjørn Erik Pedersen [Wed, 22 Feb 2023 18:17:22 +0000 (19:17 +0100)]
related: Adjust benchmark

3 years agocreate: Fix typo in error message
Aaron Hooper [Fri, 27 Jan 2023 11:38:06 +0000 (11:38 +0000)]
create: Fix typo in error message

3 years agotocss: Simplify the hugo:vars type handling
Bjørn Erik Pedersen [Tue, 21 Feb 2023 17:32:09 +0000 (18:32 +0100)]
tocss: Simplify the hugo:vars type handling

Instead of maintaing a list of all CSS units and functions this commit:

* Uses 3 regexps to detect typed CSS values (e.g. `24px`) + properly handle numeric Go types.
* These regexps may have some false positives -- e.g. strings that needs to be quoted.
* For that rare case, you can mark the string with e.g. `"32xxx" | css.Quoted`
* For the opposite case:  `"32" | css.Unquoted`

Updates #10632

3 years agoresource_transformers/tocss: Fixed hugo:vars casting
AcClassic [Sun, 12 Feb 2023 19:53:30 +0000 (20:53 +0100)]
resource_transformers/tocss: Fixed hugo:vars casting

Variables passed via the hugo:vars function where passed as type string.
This caused problems when using the variables in sass functions because
these expect a specific type. Now we check if the passed variables have
to be quoted and therefore are of type string or if they should not be
quoted and let the type interpretation up to the sass compiler.

Fixes #10632

3 years agoAdjust tests for GO 1.20
Bjørn Erik Pedersen [Mon, 6 Feb 2023 15:12:31 +0000 (16:12 +0100)]
Adjust tests for GO 1.20

Updates #10691

3 years agotpl/internal: Sync Go template src to Go 1.20
Bjørn Erik Pedersen [Mon, 6 Feb 2023 08:09:27 +0000 (09:09 +0100)]
tpl/internal: Sync Go template src to Go 1.20

Updates #10691

3 years agobuild: Update to Go 1.20
Bjørn Erik Pedersen [Mon, 6 Feb 2023 07:57:30 +0000 (08:57 +0100)]
build: Update to Go 1.20

Updates #10691

3 years agoAdd page fragments support to Related
Bjørn Erik Pedersen [Sat, 11 Feb 2023 15:20:24 +0000 (16:20 +0100)]
Add page fragments support to Related

The main topic of this commit is that you can now index fragments (content heading identifiers) when calling `.Related`.

You can do this by:

* Configure one or more indices with type `fragments`
* The name of those index configurations maps to an (optional) front matter slice with fragment references. This allows you to link
page<->fragment and page<->page.
* This also will index all the fragments (heading identifiers) of the pages.

It's also possible to use type `fragments` indices in shortcode, e.g.:

```
{{ $related := site.RegularPages.Related .Page }}
```

But, and this is important, you need to include the shortcode using the `{{<` delimiter. Not doing so will create infinite loops and timeouts.

This commit also:

* Adds two new methods to Page: Fragments (can also be used to build ToC) and HeadingsFiltered (this is only used in Related Content with
index type `fragments` and `enableFilter` set to true.
* Consolidates all `.Related*` methods into one, which takes either a `Page` or an options map as its only argument.
* Add `context.Context` to all of the content related Page API. Turns out it wasn't strictly needed for this particular feature, but it will
soon become usefil, e.g. in #9339.

Closes #10711
Updates #9339
Updates #10725

3 years agorelated: Adjust benchmark
Bjørn Erik Pedersen [Tue, 21 Feb 2023 10:06:29 +0000 (11:06 +0100)]
related: Adjust benchmark

To make it easier to compare.

3 years agorelated: Add benchmark
Bjørn Erik Pedersen [Tue, 21 Feb 2023 10:00:43 +0000 (11:00 +0100)]
related: Add benchmark

3 years agotpl/collections: Improve error message in Index
Bjørn Erik Pedersen [Wed, 8 Feb 2023 09:22:20 +0000 (10:22 +0100)]
tpl/collections: Improve error message in Index

3 years agoMake the HTML collector parsing more robust
Bjørn Erik Pedersen [Mon, 6 Feb 2023 16:29:12 +0000 (17:29 +0100)]
Make the HTML collector parsing more robust

Most notably better handling self-closing elements

Closes #10698

3 years agoRevert "build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0"
Bjørn Erik Pedersen [Sun, 5 Feb 2023 19:34:35 +0000 (20:34 +0100)]
Revert "build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0"

This reverts commit 87c78bd3e918f258bc1a4b0e8acdcec11b69bd35.

There seem to be some breaking changes in the above that needs to be looked into.

3 years agodeps: Upgrade github.com/yuin/goldmark v1.5.3 => v1.5.4
Joe Mooring [Sat, 4 Feb 2023 08:24:00 +0000 (00:24 -0800)]
deps: Upgrade github.com/yuin/goldmark v1.5.3 => v1.5.4

Closes #10661

3 years agotpl/strings: Add strings.ContainsNonSpace
Bjørn Erik Pedersen [Tue, 31 Jan 2023 08:54:34 +0000 (09:54 +0100)]
tpl/strings: Add strings.ContainsNonSpace

3 years agobuild(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0
dependabot[bot] [Fri, 3 Feb 2023 08:02:24 +0000 (08:02 +0000)]
build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0

Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.110.0 to 0.114.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.110.0...v0.114.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: Upgrade github.com/alecthomas/chroma v2.4.0 => v2.5.0
Joe Mooring [Sat, 4 Feb 2023 08:14:14 +0000 (00:14 -0800)]
deps: Upgrade github.com/alecthomas/chroma v2.4.0 => v2.5.0

Fixes #9890
Fixes #10692

3 years agomarkup: Fix linenos codeblock hl option case regression
Khayyam Saleem [Sun, 5 Feb 2023 19:06:25 +0000 (14:06 -0500)]
markup: Fix linenos codeblock hl option case regression

This fixes a regression introduced in v0.93.0 where previously, a
mixed-case key for lineNos would be successfully parsed. This change
moves the configuration key lowercasing step into the configuration
normalization stage, which is called whether the highlighting config
is being parsed from a `string` or a `map`.

Fixes #10682

3 years agoFix slow HTML elements collector for the pre case
Bjørn Erik Pedersen [Sun, 5 Feb 2023 14:14:30 +0000 (15:14 +0100)]
Fix slow HTML elements collector for the pre case

```
name                           old time/op    new time/op    delta
ElementsCollectorWriterPre-10    25.2µs ± 1%     3.4µs ± 0%  -86.54%  (p=0.029 n=4+4)

name                           old alloc/op   new alloc/op   delta
ElementsCollectorWriterPre-10      624B ± 0%      142B ± 0%  -77.18%  (p=0.029 n=4+4)

name                           old allocs/op  new allocs/op  delta
ElementsCollectorWriterPre-10      16.0 ± 0%       6.0 ± 0%  -62.50%  (p=0.029 n=4+4)
```

Fixes #10698

3 years agopublisher: Add benchmark
Bjørn Erik Pedersen [Sun, 5 Feb 2023 15:39:31 +0000 (16:39 +0100)]
publisher: Add benchmark

3 years agosnap: Install dart-sass-embedded for 32-bit ARM (armhf) too
Anthony Fok [Fri, 3 Feb 2023 12:09:42 +0000 (05:09 -0700)]
snap: Install dart-sass-embedded for 32-bit ARM (armhf) too

See https://github.com/sass/dart-sass-embedded/releases/tag/1.54.7
which "Add[ed] support for 32-bit ARM releases on Linux" on 2022-08-30.

3 years agosnap: Add read access for ~/.gitconfig.local and ~/.config/git/* too
Anthony Fok [Fri, 3 Feb 2023 12:02:35 +0000 (05:02 -0700)]
snap: Add read access for ~/.gitconfig.local and ~/.config/git/* too

in hugo:gitconfig plug (personal-files interface) in case end users need
the flexibility of using additional custom git config files.

Fixes #10337

3 years agocommands: Fix server url rewrites (http status 200)
Bjørn Erik Pedersen [Tue, 31 Jan 2023 10:16:00 +0000 (11:16 +0100)]
commands: Fix server url rewrites (http status 200)

Broken by me in Hugo 0.103.0 it seems. A little bit mysterious as it has worked for me after that, but started to fail just
recently.

Closes #10668

3 years agobuild(deps): bump github.com/kyokomi/emoji/v2 from 2.2.10 to 2.2.11
dependabot[bot] [Fri, 23 Dec 2022 08:25:02 +0000 (08:25 +0000)]
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.10 to 2.2.11

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

---
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 gocloud.dev from 0.24.0 to 0.28.0 (#10610)
dependabot[bot] [Tue, 31 Jan 2023 08:40:39 +0000 (09:40 +0100)]
build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)

Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.24.0 to 0.28.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.24.0...v0.28.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Closes #9778

3 years agoFix description of collections.Uniq
Joe Mooring [Mon, 30 Jan 2023 16:36:44 +0000 (08:36 -0800)]
Fix description of collections.Uniq

3 years agoUpdate CONTRIBUTING.md
Bjørn Erik Pedersen [Tue, 31 Jan 2023 07:08:52 +0000 (08:08 +0100)]
Update CONTRIBUTING.md

3 years agoFix shortcode detection in RenderString
Bjørn Erik Pedersen [Thu, 26 Jan 2023 09:30:25 +0000 (10:30 +0100)]
Fix shortcode detection in RenderString

Fixes #10654

3 years agoOnly invoke a given cached partial once
Bjørn Erik Pedersen [Tue, 24 Jan 2023 19:57:15 +0000 (20:57 +0100)]
Only invoke a given cached partial once

Note that this is backed by a LRU cache (which we soon shall see more usage of), so if you're a heavy user of cached partials it may be evicted and
refreshed if needed. But in most cases every partial is only invoked once.

This commit also adds a timeout (the global `timeout` config option) to make infinite recursion in partials
easier to reason about.

```
name              old time/op    new time/op    delta
IncludeCached-10    8.92ms ± 0%    8.48ms ± 1%   -4.87%  (p=0.016 n=4+5)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    6.65MB ± 0%    5.17MB ± 0%  -22.32%  (p=0.002 n=6+6)

name              old allocs/op  new allocs/op  delta
IncludeCached-10      117k ± 0%       71k ± 0%  -39.44%  (p=0.002 n=6+6)
```

Closes #4086
Updates #9588

3 years agoUpdate README.md
Bjørn Erik Pedersen [Tue, 24 Jan 2023 14:04:06 +0000 (15:04 +0100)]
Update README.md

3 years agoreleaser: Prepare repository for 0.111.0-DEV
hugoreleaser [Tue, 17 Jan 2023 12:28:17 +0000 (12:28 +0000)]
releaser: Prepare repository for 0.111.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.110.0
hugoreleaser [Tue, 17 Jan 2023 12:16:09 +0000 (12:16 +0000)]
releaser: Bump versions for release of 0.110.0

[ci skip]

3 years agodos: Regen CLI docs
Bjørn Erik Pedersen [Tue, 17 Jan 2023 11:52:53 +0000 (12:52 +0100)]
dos: Regen CLI docs

3 years agodocs: Regen docshelper
Bjørn Erik Pedersen [Tue, 17 Jan 2023 11:52:08 +0000 (12:52 +0100)]
docs: Regen docshelper

3 years agoMerge commit 'ef6f101e75256c3bb88a6f1f3b5c1273bf8d7382'
Bjørn Erik Pedersen [Tue, 17 Jan 2023 11:51:46 +0000 (12:51 +0100)]
Merge commit 'ef6f101e75256c3bb88a6f1f3b5c1273bf8d7382'

3 years agoSquashed 'docs/' changes from 2c0125b52..1214f6ffb
Bjørn Erik Pedersen [Tue, 17 Jan 2023 11:51:01 +0000 (12:51 +0100)]
Squashed 'docs/' changes from 2c0125b52..1214f6ffb

1214f6ffb Document cleanDestinationDir configuration setting
27ca65463 Clarify .Page.Param method (#1953)
3fa1792d2 Document the usage of `hardWrap` option for markdown rendering (#1951)
8b5afdfb4 Update theme
207e7f0a0 fix docs for getting remote font
1f7094b9e Correct typo
f9d6445c4 Added missing `/` in URL generator (#1946)
3a22ee7d6 Remove translations
b3b900f3f Update introduction.md
aca440052 rm Forestry - facing end-of-life shortly (#1944)
af0014e14 Update scss-sass.md
1c43bbbc9 Merge branch 'docs/goworkspace'
d034175ca netlify: Hugo 0.109.0
d3a6a5c3f Merge branch 'tempv0.109.0'
e033dbead docs: Regen docs helper JSON
452bf675c resource/page: Add Page.Ancestors
12edd7363 Add some docs for workspaces
8f0fcba6b Add HUGO_PUBLISHDIR to the Node environment
4e66d98ad Update theme
808aee6f6 config: Update to ga v4
1de2bc5a9 config: Update to ga v4
ddb5fd6b0 Merge commit '41bc6f702aa54200530efbf4267e5c823df3028d'
54c54bf76 modules: Adjust watch logic vs workspace use definitions

git-subtree-dir: docs
git-subtree-split: 1214f6ffbf680e853746aaeb6cb097b28c0c556b

3 years agorelated: Handly []any
Bjørn Erik Pedersen [Tue, 17 Jan 2023 11:36:34 +0000 (12:36 +0100)]
related: Handly []any

See #10624

3 years agoFix permalinks issue with repeated sections
Bjørn Erik Pedersen [Tue, 17 Jan 2023 10:00:38 +0000 (11:00 +0100)]
Fix permalinks issue with repeated sections

Fixes #10377

3 years agotpl/strings: Add findRESubmatch
Bjørn Erik Pedersen [Tue, 17 Jan 2023 08:35:16 +0000 (09:35 +0100)]
tpl/strings: Add findRESubmatch

Fixes #10594

3 years agoconfig/security: Add O\w+ (e.g. GOROOT) to the default allowed list
Bjørn Erik Pedersen [Tue, 17 Jan 2023 09:52:51 +0000 (10:52 +0100)]
config/security: Add O\w+ (e.g. GOROOT) to the default allowed list

Fixes #10429

3 years agoPreserve front matter slice value types (e.g. int)
Bjørn Erik Pedersen [Mon, 16 Jan 2023 15:29:42 +0000 (16:29 +0100)]
Preserve front matter slice value types (e.g. int)

Fixes #10624

3 years agoMake hugo.toml the new config.toml
Bjørn Erik Pedersen [Sun, 15 Jan 2023 17:45:51 +0000 (18:45 +0100)]
Make hugo.toml the new config.toml

Both will of course work, but hugo.toml will win if both are set.

We should have done this a long time ago, of course, but the reason I'm picking this up now is that my VS Code setup by default picks up some
JSON config schema from some random other software which also names its config files config.toml.

Fixes #8979

3 years agoAdd fill HTTP Response info into .Data in resources.GetRemote
Bjørn Erik Pedersen [Mon, 16 Jan 2023 11:44:39 +0000 (12:44 +0100)]
Add fill HTTP Response info into .Data in resources.GetRemote

See #10604

3 years agoFix HEAD method in resources.GetRemote
Bjørn Erik Pedersen [Mon, 16 Jan 2023 10:05:28 +0000 (11:05 +0100)]
Fix HEAD method in resources.GetRemote

Fixes #10604

3 years agoFix order when reading custom headers in resources.GetRemote
Bjørn Erik Pedersen [Mon, 16 Jan 2023 10:00:55 +0000 (11:00 +0100)]
Fix order when reading custom headers in resources.GetRemote

Fixes #10616

3 years agodeps: Upgrade github.com/evanw/esbuild v0.15.18 => v0.17.0
Bjørn Erik Pedersen [Mon, 16 Jan 2023 08:53:17 +0000 (09:53 +0100)]
deps: Upgrade github.com/evanw/esbuild v0.15.18 => v0.17.0

Also add a test to make sure legal comments are preserved in JS bundles.

Closes #10536

3 years agoUpdate README.md
Bjørn Erik Pedersen [Mon, 9 Jan 2023 13:13:30 +0000 (14:13 +0100)]
Update README.md

3 years agoresource: Fix Go Doc vs .Data.Integrity
Bjørn Erik Pedersen [Sat, 7 Jan 2023 09:58:34 +0000 (10:58 +0100)]
resource: Fix Go Doc vs .Data.Integrity

3 years agoMisc doc, code refactoring to improve documentation
Bjørn Erik Pedersen [Fri, 30 Dec 2022 08:20:58 +0000 (09:20 +0100)]
Misc doc, code refactoring to improve documentation

3 years agoMake readFile return nil when file not found (note)
Bjørn Erik Pedersen [Fri, 30 Dec 2022 10:10:49 +0000 (11:10 +0100)]
Make readFile return nil when file not found (note)

Fixes #9620

3 years agoRemove reference to Goreleaser in code comment
Omar Kohl [Tue, 3 Jan 2023 19:09:03 +0000 (20:09 +0100)]
Remove reference to Goreleaser in code comment

Hugo no longer uses the Goreleaser tool.

3 years agotpl/compare: Sort special float values as string
acclassic [Mon, 2 Jan 2023 16:35:08 +0000 (17:35 +0100)]
tpl/compare: Sort special float values as string

When sorting strings a worng order is returned. This happens because the strings are first converted
to floating values to check whether or not they should be sorted as
floating values. When an error is returned the strings will be
handled as string literals.
No error will be returned when parsing Inf, Infinity or NaN (case insensitive) because they
will be coverted to special floating point values and therefore are
legal float values.
Now we check if the returned converted values are special floating
values and treat them as string literals.

Fixes #10389

3 years agotpl/diagrams: Move Goat to its own file
Bjørn Erik Pedersen [Sun, 25 Dec 2022 13:02:22 +0000 (14:02 +0100)]
tpl/diagrams: Move Goat to its own file

3 years agoUpdate CONTRIBUTING.md
Bjørn Erik Pedersen [Sat, 24 Dec 2022 14:53:27 +0000 (15:53 +0100)]
Update CONTRIBUTING.md

3 years agoUpdate CONTRIBUTING.md
Bjørn Erik Pedersen [Sat, 24 Dec 2022 14:49:00 +0000 (15:49 +0100)]
Update CONTRIBUTING.md

3 years agoUpdate README.md
Bjørn Erik Pedersen [Sat, 24 Dec 2022 14:48:45 +0000 (15:48 +0100)]
Update README.md

3 years agoreleaser: Prepare repository for 0.110.0-DEV
hugoreleaser [Fri, 23 Dec 2022 10:50:52 +0000 (10:50 +0000)]
releaser: Prepare repository for 0.110.0-DEV

[ci skip]

3 years agoreleaser: Bump versions for release of 0.109.0
hugoreleaser [Fri, 23 Dec 2022 10:38:11 +0000 (10:38 +0000)]
releaser: Bump versions for release of 0.109.0

[ci skip]

3 years agoAdjust "you need the extended version" error message
Bjørn Erik Pedersen [Fri, 23 Dec 2022 09:33:49 +0000 (10:33 +0100)]
Adjust "you need the extended version" error message

3 years agodocs: Regen docs helper JSON
Bjørn Erik Pedersen [Fri, 23 Dec 2022 09:15:48 +0000 (10:15 +0100)]
docs: Regen docs helper JSON

3 years agoresource/page: Slight adjustment of Page.Ancestors
Bjørn Erik Pedersen [Fri, 23 Dec 2022 08:13:19 +0000 (09:13 +0100)]
resource/page: Slight adjustment of Page.Ancestors

Fixes #10567

3 years agoresource/page: Add Page.Ancestors
Septs [Wed, 30 Nov 2022 04:02:57 +0000 (12:02 +0800)]
resource/page: Add Page.Ancestors

Fixes #10567

3 years agobuild(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0
dependabot[bot] [Wed, 7 Dec 2022 08:01:50 +0000 (08:01 +0000)]
build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0

Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.3.0...v0.4.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>
3 years agoAnnotate test assertions
Joe Mooring [Thu, 22 Dec 2022 16:39:42 +0000 (08:39 -0800)]
Annotate test assertions

3 years agohugolib: Exclude non-linkable pages from translations map
Joe Mooring [Thu, 22 Dec 2022 16:19:24 +0000 (08:19 -0800)]
hugolib: Exclude non-linkable pages from translations map

Fixes #9073

3 years agoAdd HUGO_PUBLISHDIR to the Node environment
Bjørn Erik Pedersen [Thu, 22 Dec 2022 08:43:53 +0000 (09:43 +0100)]
Add HUGO_PUBLISHDIR to the Node environment

So you can do  `process.env.HUGO_PUBLISHDIR` in your `postcss.config.js` to figure out where Hugo publishes
its files.

Note that the value will always be an absolute file path and will point to a directory on disk even when running `hugo server` in memory mode.

If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:

```
hugo server --renderToDisk
hugo server --renderStaticToDisk
```

Fixes #10554

3 years agoRevert "tpl/tplimpl: Use https in sitemap templates"
Joe Mooring [Thu, 22 Dec 2022 01:42:11 +0000 (17:42 -0800)]
Revert "tpl/tplimpl: Use https in sitemap templates"

This reverts commit 3fd0b78498597ceb343b7fda2e9b652f3e957478.

3 years agotpl: Improve template funcs GoDoc
Bjørn Erik Pedersen [Wed, 21 Dec 2022 12:11:08 +0000 (13:11 +0100)]
tpl: Improve template funcs GoDoc

3 years agotpl/resources: Fix data race in ToCSS
Bjørn Erik Pedersen [Wed, 21 Dec 2022 10:19:38 +0000 (11:19 +0100)]
tpl/resources: Fix data race in ToCSS

Fixes #10542

3 years agotocss: Add some more test cases
Bjørn Erik Pedersen [Wed, 21 Dec 2022 08:17:51 +0000 (09:17 +0100)]
tocss: Add some more test cases

See #10555

3 years agotocss: Fix unquote case with double quotes
Septs [Wed, 21 Dec 2022 02:24:13 +0000 (10:24 +0800)]
tocss: Fix unquote case with double quotes

See #10555

3 years agoAllow "fast render mode" even if --disableLiveReload is set
Bjørn Erik Pedersen [Wed, 21 Dec 2022 10:02:21 +0000 (11:02 +0100)]
Allow "fast render mode" even if --disableLiveReload is set

Fixes #10561

3 years agotocss: Add vars option
Bjørn Erik Pedersen [Mon, 19 Dec 2022 17:49:02 +0000 (18:49 +0100)]
tocss: Add vars option

This commit adds a new `vars` option to both the Sass transpilers (Dart Sass and Libsass).

This means that you can pass a map with key/value pairs to the transpiler:

```handlebars
{{ $vars := dict "$color1" "blue" "$color2" "green" "$font_size" "24px" }}
{{ $cssOpts := (dict "transpiler" "dartsass" "outputStyle" "compressed" "vars" $vars ) }}
{{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
```

And the the variables will be available in the `hugo:vars` namespace. Example usage for Dart Sass:

```scss
@use "hugo:vars" as v;

p {
    color: v.$color1;
    font-size: v.$font_size;
}
```

Note that Libsass does not support the `use` keyword, so you need to `import` them as global variables:

```scss
@import "hugo:vars";

p {
    color: $color1;
    font-size: $font_size;
}
```

Hugo will:

* Add a missing leading `$` for the variable names if needed.
* Wrap the values in `unquote('VALUE')` (Sass built-in) to get proper handling of identifiers vs other strings.

This means that you can pull variables directly from e.g. the site config:

```toml
[params]
[params.sassvars]
color1 = "blue"
color2 = "green"
font_size = "24px"
image = "images/hero.jpg"
```

```handlebars
{{ $vars := site.Params.sassvars}}
{{ $cssOpts := (dict "transpiler" "dartsass" "outputStyle" "compressed" "vars" $vars ) }}
{{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
```

Fixes #10555

3 years agoSquashed 'docs/' changes from 2201ac0e5..2c0125b52
Bjørn Erik Pedersen [Tue, 20 Dec 2022 10:04:41 +0000 (11:04 +0100)]
Squashed 'docs/' changes from 2201ac0e5..2c0125b52

2c0125b52 Remove .Site.Author
2cf8841b3 Update partialCached.md (#1924)
385487191 Update data-templates.md (#1926)
ce207e141 Remove redundant markdown and fix a few typos (#1936)
3687c2953 Make heading id linkable, take 2
45c79bea7 Make heading id linkable
b22079344 Delete duplicates the lines 557-569 and 570-582. (#1934)
0a90dc122 Rework the taxonomy variables page (#1935)
7f8979c50 Update theme
26e682a3a Update multilingual.md
d40e7693f Update postcss.md
375d75c01 Update postcss npm instructions (#1931)
63020094a Emphasize Window shell selection (#1930)
56824be2c Update configuration.md
b7b8f16b3 Docu 'Theme components': minor fix (#1929)
09dc81a05 Remove Docker from BSD page (#1927)
205fea204 netlify: Hugo 0.108.0
6abe49c28 Merge commit 'da670c38ee63a7fef25e2b9f42519232055b60dc'
12b59a4c5 docs: Add basic doc for wrapStandAloneImageWithinParagraph etc.
ba07bd970 dartsass: Add sourceMapIncludeSources option

git-subtree-dir: docs
git-subtree-split: 2c0125b5290494d49334606c451446ebd9df3c21

3 years agoMerge commit '41bc6f702aa54200530efbf4267e5c823df3028d'
Bjørn Erik Pedersen [Tue, 20 Dec 2022 10:04:41 +0000 (11:04 +0100)]
Merge commit '41bc6f702aa54200530efbf4267e5c823df3028d'

3 years agomodules: Improve "module workspace" not found error
Bjørn Erik Pedersen [Tue, 20 Dec 2022 08:06:38 +0000 (09:06 +0100)]
modules: Improve "module workspace" not found error

3 years agomodules: Adjust watch logic vs workspace use definitions
Bjørn Erik Pedersen [Mon, 19 Dec 2022 16:49:45 +0000 (17:49 +0100)]
modules: Adjust watch logic vs workspace use definitions

3 years agoAdd any configured Go Workspace file to the config watcher
Bjørn Erik Pedersen [Mon, 19 Dec 2022 14:50:53 +0000 (15:50 +0100)]
Add any configured Go Workspace file to the config watcher

Fixes #10556

3 years agomodules: Make the module.workspace=off as default (note)
Bjørn Erik Pedersen [Mon, 19 Dec 2022 14:40:47 +0000 (15:40 +0100)]
modules: Make the module.workspace=off as default (note)

Also, resolve any workspace file relative to the workingDir.

Fixes #10553