hugoreleaser
463e440c7a
releaser: Prepare repository for 0.148.0-DEV
...
[ci skip]
2025-05-27 11:31:53 +00:00
hugoreleaser
0a5fd8ebb8
releaser: Bump versions for release of 0.147.6
...
[ci skip]
2025-05-27 11:17:16 +00:00
Bjørn Erik Pedersen
9ad26b69ad
Fix it so e.g. de in layouts/_shortcodes/de.html is not interpreted as a language code
...
Fixes #13740
2025-05-26 20:26:56 +02:00
hugoreleaser
e25db38467
releaser: Prepare repository for 0.148.0-DEV
...
[ci skip]
2025-05-22 11:51:47 +00:00
hugoreleaser
7766fc6241
releaser: Bump versions for release of 0.147.5
...
[ci skip]
2025-05-22 11:37:19 +00:00
hugoreleaser
e6574cf7a7
releaser: Prepare repository for 0.148.0-DEV
...
[ci skip]
2025-05-12 12:40:04 +00:00
hugoreleaser
05417512bd
releaser: Bump versions for release of 0.147.3
...
[ci skip]
2025-05-12 12:25:03 +00:00
hugoreleaser
d70f828e2b
releaser: Prepare repository for 0.148.0-DEV
...
[ci skip]
2025-05-06 11:33:36 +00:00
hugoreleaser
c7feb15d10
releaser: Bump versions for release of 0.147.2
...
[ci skip]
2025-05-06 11:18:55 +00:00
hugoreleaser
d799c045fd
releaser: Prepare repository for 0.148.0-DEV
...
[ci skip]
2025-05-01 14:04:58 +00:00
hugoreleaser
95666fc5a4
releaser: Bump versions for release of 0.147.1
...
[ci skip]
2025-05-01 13:50:04 +00:00
hugoreleaser
5857b60cbc
releaser: Prepare repository for 0.148.0-DEV
...
[ci skip]
2025-04-25 15:41:01 +00:00
hugoreleaser
7d0039b86d
releaser: Bump versions for release of 0.147.0
...
[ci skip]
2025-04-25 15:26:28 +00:00
hugoreleaser
df44ee1353
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-22 17:42:19 +00:00
hugoreleaser
1ad3d39dc4
releaser: Bump versions for release of 0.146.7
...
[ci skip]
2025-04-22 17:26:42 +00:00
Bjørn Erik Pedersen
496730840e
Revert the breaking change from 0.146.0 with dots in content filenames
...
Closes #13632
2025-04-22 19:23:19 +02:00
hugoreleaser
99fff2997d
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-20 11:13:56 +00:00
hugoreleaser
1e0b058efe
releaser: Bump versions for release of 0.146.6
...
[ci skip]
2025-04-20 10:58:40 +00:00
hugoreleaser
d5a8c330cb
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-15 18:09:42 +00:00
hugoreleaser
61328976e1
releaser: Bump versions for release of 0.146.5
...
[ci skip]
2025-04-15 17:54:38 +00:00
Bjørn Erik Pedersen
d61b9fc605
tpl: Fix language handling in partials
...
We now use the same code path for all templates re this.
Fixes #13612
2025-04-15 11:25:54 +02:00
hugoreleaser
01667275d4
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-14 13:25:05 +00:00
hugoreleaser
985af1c097
releaser: Bump versions for release of 0.146.4
...
[ci skip]
2025-04-14 13:10:30 +00:00
hugoreleaser
915ba3f7f0
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-12 17:36:11 +00:00
hugoreleaser
05ef8b713a
releaser: Bump versions for release of 0.146.3
...
[ci skip]
2025-04-12 17:21:50 +00:00
hugoreleaser
53221f88ca
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-11 17:39:58 +00:00
hugoreleaser
ff3ab192c2
releaser: Bump versions for release of 0.146.2
...
[ci skip]
2025-04-11 17:25:13 +00:00
hugoreleaser
e3e3f9ae17
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-10 16:59:48 +00:00
hugoreleaser
acc4fe24be
releaser: Bump versions for release of 0.146.1
...
[ci skip]
2025-04-10 16:44:46 +00:00
hugoreleaser
648204b3f1
releaser: Prepare repository for 0.147.0-DEV
...
[ci skip]
2025-04-10 15:13:26 +00:00
hugoreleaser
5d1b9d3985
releaser: Bump versions for release of 0.146.0
...
[ci skip]
2025-04-10 14:57:56 +00:00
Bjørn Erik Pedersen
208a0de6c3
tpl: Add a partial lookup cache
...
````
│ stash.bench │ perf-v146.bench │
│ sec/op │ sec/op vs base │
LookupPartial-10 248.00n ± 0% 14.75n ± 2% -94.05% (p=0.002 n=6)
│ stash.bench │ perf-v146.bench │
│ B/op │ B/op vs base │
LookupPartial-10 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.002 n=6)
│ stash.bench │ perf-v146.bench │
│ allocs/op │ allocs/op vs base │
LookupPartial-10 3.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6)
```
THe speedup above assumes reuse of the same partials over and over again, which I think is not uncommon.
This commits also adds some more lookup benchmarks. The current output of these on my MacBook looks decent:
```
BenchmarkLookupPagesLayout/Single_root-10 3031562 395.5 ns/op 0 B/op 0 allocs/op
BenchmarkLookupPagesLayout/Single_sub_folder-10 2515915 480.9 ns/op 0 B/op 0 allocs/op
BenchmarkLookupPartial-10 84808112 14.13 ns/op 0 B/op 0 allocs/op
BenchmarkLookupShortcode/toplevelpage-10 8111779 148.2 ns/op 0 B/op 0 allocs/op
BenchmarkLookupShortcode/nestedpage-10 8088183 148.6 ns/op 0 B/op 0 allocs/op
```
Note that in the above the partial lookups are cahced, the others not (they are harder to cache because of the page path).
Closes #13571
2025-04-10 11:07:19 +02:00
Bjørn Erik Pedersen
d4c6dd16b1
tpl: Add templates.Current
...
This commit also
* Unexport all internal state in TemplateInfo.
* Make the dispatcher keys used for passing context.Context into uint8 from string to save memory allocations.
Co-authored-by: Joe Mooring <joe@mooring.com >
Updates #13571
2025-04-09 20:15:40 +02:00
Bjørn Erik Pedersen
83cfdd78ca
Reimplement and simplify Hugo's template system
...
See #13541 for details.
Fixes #13545
Fixes #13515
Closes #7964
Closes #13365
Closes #12988
Closes #4891
2025-04-06 20:59:41 +02:00
Bjørn Erik Pedersen
812ea0b325
config: Use the non-global logger for deprecations when possible
...
To prevent warnings leaking into parallel tests.
2025-04-03 13:43:54 +02:00
Bjørn Erik Pedersen
8d2379bcb3
common/hreflect: Replace the map/RWMutex method cache with sync.Map
...
It's much faster when running in parallel:
```
GetMethodByName-10 125.1n ± 6% 181.7n ± 7% +45.30% (p=0.002 n=6)
GetMethodByNamePara-10 770.10n ± 1% 24.77n ± 9% -96.78% (p=0.002 n=6)
```
2025-03-26 14:24:51 +01:00
Joe Mooring
a6bd67793b
common/hexec: Remove github.com/cli/safeexec
...
We began using the safeexec package in v0.79.1 to address
https://github.com/gohugoio/hugo/security/advisories/GHSA-8j34-9876-pvfq .
The vulnerability was addressed by the Go team in 1.19, so the safeexec
package is no longer needed.
Closes #13516
2025-03-23 13:55:42 +01:00
hugoreleaser
cb4a097190
releaser: Prepare repository for 0.146.0-DEV
...
[ci skip]
2025-02-26 15:58:38 +00:00
hugoreleaser
666444f0a5
releaser: Bump versions for release of 0.145.0
...
[ci skip]
2025-02-26 15:41:25 +00:00
Bjørn Erik Pedersen
c498d0fe1e
Use the page path and not the backing filename as the last resort in the default sort
...
This should:
1. Fix some (rare) tiebreaker issues when sorting pages from multiple content adapters.
2. Improve the sorting for pages without a backing file.
2025-02-26 13:06:26 +01:00
Bjørn Erik Pedersen
521911a576
all: Run modernize -fix ./...
2025-02-26 11:44:25 +01:00
hugoreleaser
669216e204
releaser: Prepare repository for 0.145.0-DEV
...
[ci skip]
2025-02-18 12:29:51 +00:00
hugoreleaser
a79d63a446
releaser: Bump versions for release of 0.144.1
...
[ci skip]
2025-02-18 12:14:07 +00:00
hugoreleaser
f1e799c2e1
releaser: Prepare repository for 0.145.0-DEV
...
[ci skip]
2025-02-17 16:36:56 +00:00
hugoreleaser
b289b17c43
releaser: Bump versions for release of 0.144.0
...
[ci skip]
2025-02-17 16:22:31 +00:00
Bjørn Erik Pedersen
9b5f786df8
Deprecate kind, lang, and path from front matter
...
These were added to the page meta object when we implemented "pages from data", but were not meant to be used in front matter.
That is not supported, so we might as well add validation.
Fixes #12484
2025-02-10 21:22:43 +01:00
Bjørn Erik Pedersen
c2fb221209
Add ContentTypes to config
...
This is an empty struct for now, but we will most likely expand on that.
```
[contentTypes]
[contentTypes.'text/markdown']
```
The above means that only Markdown will be considered a content type. E.g. HTML will be treated as plain text.
Fixes #12274
2025-02-08 10:31:15 +01:00
Oleksandr Redko
4245a4514d
all: Remove deprecated build tags
2025-02-08 10:29:42 +01:00
hugoreleaser
377287a614
releaser: Prepare repository for 0.144.0-DEV
...
[ci skip]
2025-02-04 09:14:03 +00:00
hugoreleaser
0270364a34
releaser: Bump versions for release of 0.143.1
...
[ci skip]
2025-02-04 08:57:38 +00:00