1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2024-12-29 02:02:43 +00:00
Commit graph

7866 commits

Author SHA1 Message Date
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 
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5251f015bf Re-establish all the server flags
Updates 
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5d857165fe Deprecate site.Language.Params and some other fixes
Updates 
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 
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 
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 .
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 
Closes 
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 
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 ()" ()
This reverts commit a4fb8dc6bc.
2023-05-06 09:36:29 -07:00
Kirill Bobyrev
a4fb8dc6bc
Update syntax-highlighting.md () 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 
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 .

Updates 
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 
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 
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 
2023-03-12 11:39:38 +01:00
Andreas Deininger
d55af2abf0 Run gofmt -s on source files 2023-03-12 10:32:29 +01:00
Joe Mooring
b6f44aaf1a docs: Improve examples of variadic math functions 2023-03-12 10:32:01 +01:00
septs
84201e8d5d
tpl/math: Allow multi numbers in add, sub, mul, div, min and max 2023-03-11 11:21:08 +01:00
Andreas Deininger
04b9811643
readme: Update dependency list 2023-03-11 10:15:16 +01:00
Andreas Deininger
9818724b5b
Improve error message for unclosed shortcode with inner content 2023-03-10 18:41:17 +01:00
Bjørn Erik Pedersen
34a86e13f6 Don't fail when calling Paginate with an empty pages.PagesGroup
Fixes 
2023-03-10 16:34:17 +01:00
Oleksandr Redko
0f01bd4637 server: Replace golang.org/x/net/context with context 2023-03-08 10:19:25 +01:00
Jonathan Fisher
d171d1543d tpl: Add hasSuffix alias
strings.HasPrefix already has an alias of hasPrefix
but strings.HasSuffix has no such alias.
This PR adds a hasSuffix alias to the tpl function with corresponding
function documentation.
It also adds a Minor update to the hasPrefix function documentation
re: keywords and relatedfuncs.

 Completes https://github.com/gohugoio/hugo/issues/10474
2023-03-08 10:18:34 +01:00
Oleksandr Redko
02ab77da3e watcher: use time.NewTicker to prevent leaks
Replace time.Tick with time.NewTicker.
2023-03-08 10:16:34 +01:00
davidejones
873be9f90a ensure we default to 10 correctly 2023-03-07 15:38:26 +01:00
davidejones
bebb2b8d0a switch transfers to workers 2023-03-07 15:38:26 +01:00
davidejones
e6f029bdee customize parallel transfer count 2023-03-07 15:38:26 +01:00
johannesengl
bdbfacb868 metadecoders: Add support for native org dates in frontmatter
PR  added support for Org timestamps for the DATE header. This PR widens the support with additional front matter headers LASTMOD, PUBLISHDATE and EXPIRYDATE.

Fixes 
2023-03-06 20:37:31 +01:00
hugoreleaser
32ea40aa82 releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-05 12:43:18 +00:00
hugoreleaser
4164f8fef9 releaser: Bump versions for release of 0.111.2
[ci skip]
2023-03-05 12:32:20 +00:00
Bjørn Erik Pedersen
b83050cb40 Fix .Fragments when called cross sites on uninitialized output format
Fixes 
2023-03-05 12:51:57 +01:00
Bjørn Erik Pedersen
df5608f8a0 Allow page.TableOfContents on self in shortcode
Fixes 
2023-03-05 12:51:57 +01:00