Commit graph

7533 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
e4e0313c80
tpl/urls: Fix build broken by a merge 2023-05-19 10:57:03 +02:00
Joe Mooring
5b3e165bad tpl/urls: Add JoinPath template function
See https://pkg.go.dev/net/url#JoinPath

Closes #9694
2023-05-19 10:31:17 +02:00
Bjørn Erik Pedersen
03cb38e6c6
Allow legacy taxonomyTerm in disableKinds
Updates #10953
2023-05-19 09:17:55 +02:00
Andreas Deininger
ad4bc969da Fix warn message about custom params on the language top level 2023-05-19 08:43:02 +02:00
cui fliter
4003c7903f
Fix some spelling mistakes 2023-05-19 08:40:08 +02:00
Oleksandr Redko
610cedaa61 all: Fix comments for exported functions and packages 2023-05-18 21:25:27 +02:00
Bjørn Erik Pedersen
24e7d0c174 deps: Update github.com/bep/golibsass v1.1.0 => v1.1.1
Fixes #10629
Fixes #10491
2023-05-18 21:24:33 +02:00
Benjamin Elder
008170c8a9
Make GOMAXPROCS to be CPU limit aware
Fixes #10950
2023-05-18 19:32:49 +02:00
Bjørn Erik Pedersen
7c647bcaeb Allow empty params.mainSections
Updates #10953
2023-05-18 17:55:29 +02:00
Oleksandr Redko
95818e27dc modules: Fix format flag in error 2023-05-18 16:26:20 +02:00
Bjørn Erik Pedersen
3f00f47535 commands: Load config before creating the filesystem
To allow publishDir to be set in config file.
2023-05-18 15:38:25 +02:00
Bjørn Erik Pedersen
834b3d7e41
Fix some recently introduced error handling issues
Updates #10953
2023-05-18 12:47:23 +02:00
Joe Mooring
1155bbca9d tpl/lang: document delimiter option for FormatNumberCustom
Closes gohugoio/hugoDocs#1760
2023-05-17 23:35:43 +02:00
Bjørn Erik Pedersen
86b2a27438
Re-add site.LanguagePrefix
Updates #10947
2023-05-17 23:27:40 +02:00
Bjørn Erik Pedersen
35955f50e6
github: Trim the test flow a little
We now have much improved end to end tests, so cut the building of the docs site to save some time of the PR builds.
2023-05-17 22:14:15 +02:00
Bjørn Erik Pedersen
8a69ccbb00 commands: Improve the common build flag handling
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
7ce033a89d Support, but warn, about top level language custom params
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
05542130ba Handle transient errors in config loading etc.
As in: Get the Kubernetes site to build with the new Hugo version.

Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5251f015bf Re-establish all the server flags
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5d857165fe Deprecate site.Language.Params and some other fixes
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
0106cf1a6d
Revert "Make GOMAXPROCS CPU limit aware"
I shouldn't have merged this without running the tests.

This libray logs to stderr on init, which is a no go for us.

Re. test failure:

```
[stderr]
2023/05/17 18:21:04 maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
```
This reverts commit 59050f97f6.
2023-05-17 21:01:52 +02:00
Benjamin Elder
59050f97f6
Make GOMAXPROCS CPU limit aware
Fixes #10950
2023-05-17 20:17:22 +02:00
Bjørn Erik Pedersen
faa6998f26
Add Sections to Site interface
See https://github.com/gohugoio/hugo/issues/10947#issuecomment-1550012671

Updates #10947
2023-05-16 18:53:34 +02:00
Oleksandr Redko
3d90871e9e helpers: simplify path tests with T.TempDir 2023-05-16 18:35:19 +02:00
Oleksandr Redko
bda082c98c
tpl: Add math.Abs
Fixes #10941.
2023-05-16 18:32:07 +02:00
Bjørn Erik Pedersen
241b21b0fd Create a struct with all of Hugo's config options
Primary motivation is documentation, but it will also hopefully simplify the code.

Also,

* Lower case the default output format names; this is in line with the custom ones (map keys) and how
it's treated all the places. This avoids doing `stringds.EqualFold` everywhere.

Closes #10896
Closes #10620
2023-05-16 18:01:29 +02:00
Bjørn Erik Pedersen
6aededf6b4 Improve date parsing performance for the common case
```
name                    old time/op    new time/op    delta
Baseline/skiprender-10    24.5ms ±10%    22.3ms ± 4%   -8.93%  (p=0.029 n=4+4)

name                    old alloc/op   new alloc/op   delta
Baseline/skiprender-10    30.0MB ± 0%    26.2MB ± 0%  -12.74%  (p=0.029 n=4+4)

name                    old allocs/op  new allocs/op  delta
Baseline/skiprender-10      373k ± 0%      279k ± 0%  -25.07%  (p=0.029 n=4+4)
```

Fixes #10942
2023-05-15 11:25:24 +02:00
Bjørn Erik Pedersen
0988b76a78
Add a counter helper 2023-05-15 09:23:26 +02:00
Bjørn Erik Pedersen
e0e19a934f
Expand the baseline benchmark a little 2023-05-15 08:39:52 +02:00
Joe Mooring
bcd7ac7704
Revert "Update syntax-highlighting.md (#10929)" (#10930)
This reverts commit a4fb8dc6bc.
2023-05-06 09:36:29 -07:00
Kirill Bobyrev
a4fb8dc6bc
Update syntax-highlighting.md (#10929) 2023-05-06 07:00:37 -07:00
Bjørn Erik Pedersen
4f341fa1af
Update README.md 2023-05-04 23:56:57 +02:00
Joe Mooring
5c7b79cf7f tpl/strings: Clarify findRESubmatch description 2023-04-27 22:02:41 +02:00
Joe Mooring
0cb6ca5906 langs/i18n: Fallback to defaultContentLanguage instead of English
Co-authored-by: 641bill <wo23636@126.com>

Fixes #9216
2023-04-24 21:20:09 +02:00
Bjørn Erik Pedersen
f1062519ae
tpl/debug: Add VisualizeSpaces 2023-04-20 11:27:55 +02:00
Bjørn Erik Pedersen
46a3cf6186
Update README.md 2023-04-18 08:35:37 +02:00
Bjørn Erik Pedersen
9906c1ae52
Prevent the global error collector to panic when sending on closed channel 2023-04-13 11:44:22 +02:00
Bjørn Erik Pedersen
5596dc24a0 markup/goldmark: Add config options for the typographer extension
Note that the config per language part of this will be handled in #10602.

Updates #9772
2023-04-12 14:41:32 +02:00
Kiril Isakov
d01731d53c
readme: Fix build command 2023-04-09 11:59:46 +02:00
Bjørn Erik Pedersen
f1e8f010f5
Update README.md 2023-03-30 10:19:35 +02:00
Bjørn Erik Pedersen
5748133d50 Add test for ToC vs include
See #10866
2023-03-29 17:49:01 +02:00
Andreas Deininger
05c095a0e6 resources.functions: improve validation 2023-03-20 14:53:57 +01:00
Oleksandr Redko
891b2918d2 resources: Fix typos in error message and variables 2023-03-20 14:52:59 +01:00
Bjørn Erik Pedersen
b0b1b76dc9 markup/goldmark: Fail on invalid Markdown attributes 2023-03-15 08:54:34 +01:00
Bjørn Erik Pedersen
0fbab7cbc5
commands: Fix data race in test
Note that this is a test fix only.
2023-03-14 12:18:42 +01:00
septs
f5eddf89bf
tpl/math: Return error if less than 2 input numbers
Fixes #10827
2023-03-14 09:28:38 +01:00
hugoreleaser
0e8ab20a84 releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-12 11:51:49 +00:00
hugoreleaser
5d4eb5154e releaser: Bump versions for release of 0.111.3
[ci skip]
2023-03-12 11:40:50 +00:00
Niklas Fasching
1c841ec914 deps: Update go-org to v1.6.6
among other things, fixes a race condition in html writer and bug preventing
explicit line breaks immediately following emphasis
2023-03-12 12:38:12 +01:00
Bjørn Erik Pedersen
e7148f335f Fix "unknown shortcode token" when calling shortcode within fenced code block
Fixes #10819
2023-03-12 11:39:38 +01:00