Age | Commit message (Collapse) | Author |
|
Closes #12795
|
|
See #12776
|
|
Previouly, only "ERROR failed to fetch remote resource: Forbidden"
would be shown when a resource failed to load. In my case, a tweet's
author I was embedding using the twitter shortcode switched his profile
to private which resulted in my blog failing to build. To figure out
where the originates, I added the log to the error message.
|
|
Fixes #12733
|
|
Broken in v0.130.0. Added a integration test to avoid future breakage.
Fixes #12712
|
|
|
|
|
|
This change allows to use permalink tokens in url front matter fields. This should be useful to target more specific pages instead of using a global permalink configuration. It's expected to be used with cascade.
Fixes #9714
|
|
Fixes #12688
Fixes #12656
|
|
And remove now unsued hashing funcs.
|
|
Note that we only use this for change detection.
The previous implementation invoked `MD5FromReaderFast` that created a MD5 has from 8 64 bytes chunks in the file, which is obviously very fast. The new implementation creates the hash from the entire file and ... seems to be even more effective:
```
name old time/op new time/op delta
HashImage-10 9.45µs ±21% 10.89µs ± 1% ~ (p=0.343 n=4+4)
name old alloc/op new alloc/op delta
HashImage-10 144B ± 0% 8B ± 0% -94.44% (p=0.029 n=4+4)
name old allocs/op new allocs/op delta
HashImage-10 4.00 ± 0% 1.00 ± 0% -75.00% (p=0.029 n=4+4)
```
|
|
|
|
```
name old time/op new time/op delta
HashString/n28-10 133ns ± 9% 107ns ±10% -19.58% (p=0.029 n=4+4)
HashString/n112-10 243ns ± 5% 121ns ± 4% -50.08% (p=0.029 n=4+4)
HashString/n448-10 698ns ± 3% 174ns ± 5% -75.02% (p=0.029 n=4+4)
HashString/n1792-10 2.58µs ± 4% 0.38µs ± 4% -85.11% (p=0.029 n=4+4)
HashString/n7168-10 10.0µs ± 3% 1.3µs ± 4% -86.91% (p=0.029 n=4+4)
name old alloc/op new alloc/op delta
HashString/n28-10 80.0B ± 0% 72.0B ± 0% -10.00% (p=0.029 n=4+4)
HashString/n112-10 160B ± 0% 152B ± 0% -5.00% (p=0.029 n=4+4)
HashString/n448-10 496B ± 0% 488B ± 0% -1.61% (p=0.029 n=4+4)
HashString/n1792-10 1.84kB ± 0% 1.83kB ± 0% -0.43% (p=0.029 n=4+4)
HashString/n7168-10 8.24kB ± 0% 8.23kB ± 0% -0.06% (p=0.029 n=4+4)
name old allocs/op new allocs/op delta
HashString/n28-10 4.00 ± 0% 3.00 ± 0% -25.00% (p=0.029 n=4+4)
HashString/n112-10 4.00 ± 0% 3.00 ± 0% -25.00% (p=0.029 n=4+4)
HashString/n448-10 4.00 ± 0% 3.00 ± 0% -25.00% (p=0.029 n=4+4)
HashString/n1792-10 4.00 ± 0% 3.00 ± 0% -25.00% (p=0.029 n=4+4)
HashString/n7168-10 4.00 ± 0% 3.00 ± 0% -25.00% (p=0.029 n=4+4)
```
|
|
```
name old time/op new time/op delta
HashString/n28-10 131ns ± 7% 133ns ±19% ~ (p=0.343 n=4+4)
HashString/n112-10 237ns ± 5% 241ns ± 3% ~ (p=0.229 n=4+4)
HashString/n448-10 688ns ± 3% 687ns ± 1% ~ (p=0.886 n=4+4)
HashString/n1792-10 2.51µs ± 3% 2.56µs ± 3% ~ (p=0.200 n=4+4)
HashString/n7168-10 10.1µs ± 2% 10.0µs ± 4% ~ (p=0.686 n=4+4)
name old alloc/op new alloc/op delta
HashString/n28-10 80.0B ± 0% 80.0B ± 0% ~ (all equal)
HashString/n112-10 160B ± 0% 160B ± 0% ~ (all equal)
HashString/n448-10 496B ± 0% 496B ± 0% ~ (all equal)
HashString/n1792-10 1.84kB ± 0% 1.84kB ± 0% ~ (all equal)
HashString/n7168-10 8.24kB ± 0% 8.24kB ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
HashString/n28-10 4.00 ± 0% 4.00 ± 0% ~ (all equal)
HashString/n112-10 4.00 ± 0% 4.00 ± 0% ~ (all equal)
HashString/n448-10 4.00 ± 0% 4.00 ± 0% ~ (all equal)
HashString/n1792-10 4.00 ± 0% 4.00 ± 0% ~ (all equal)
HashString/n7168-10 4.00 ± 0% 4.00 ± 0% ~ (all equal)
```
Closes #11644
|
|
Closes #10855
Closes #8586
Closes #8996
|
|
Fixes #12438
|
|
Closes #12618
Closes #12620
|
|
Closes #8086
Closes #12589
|
|
|
|
See #12572
|
|
This was recently introduced. so no breaking change.
The thing is:
* We do not commonly use the prefix Default* even if it can be overridden in the templates.
* PagerSize makes more sense and is also the term used in the code.
|
|
Closes #12578
|
|
Also consolidate the pagination configuration into a struct.
Closes #12572
|
|
Closes #12575
|
|
|
|
Fixes #12502
Closes #11891
|
|
Closes #12513
|
|
Fixes #12507
|
|
Fixes #12497
|
|
Fixes #12493
|
|
Fixes #12490
|
|
Closes #12427
Closes #12485
Closes #6310
Closes #5074
|
|
This is how we should have fixed #1239.
Fixes #12456
|
|
Fixes #12458
|
|
|
|
So it doesn't get visible when passing it to `jsonify`.
|
|
Fixes #12395
|
|
|
|
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
|
|
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
|
|
Closes #12316
|
|
|
|
|
|
|
|
When creating a link to a file with a `#` in the filename, the link gets
truncated. This happens because the filename is eventaully passed to
`url.Parse` which (correctly!) interprets the `#` as fragment separator.
This commit escapes the `#` in the filename before creating the link.
Fixes #4926
Fixes #8232
Fixes #12342
Co-authored-by: Joe Mooring <[email protected]>
|
|
Closes #10412
Closes #12310
|
|
|
|
This fixes TestImageOperationsGolden "values are not deep equal" error on riscv64 with Go 1.22 and above.
|
|
Closes #12228
|
|
|