Age | Commit message (Collapse) | Author |
|
|
|
|
|
We occasionally see warnings when building our site:
```
WARN 2019/06/25 23:07:08 make non-relative ref/relref page reference(s) in page %q absolute, e.g. {{< ref "/blog/my-post.md" >}}
```
But the `%q` value is missing, making it difficult to track down the source of the warning.
This change addresses that, by including the source path in the warning:
```
WARN 2019/06/25 23:07:31 make non-relative ref/relref page reference(s) in page "blog/my-post/index.md" absolute, e.g. {{< ref "/blog/my-post.md" >}}
```
|
|
Also rework test test setup so the benchmarks can also be run as tests, which
is useful when creating new benchmarks an make sure they ... work.
|
|
The `sort` template func was producing a `[]page.Page` which did not work in `.Paginate`.
Fixes #6023
|
|
Fixes #4870
|
|
Hugo `0.55.0` introduced some new interface types for `Page` etc.
This worked great in general, but there were cases where this would fail in `where` and `sort`.
One such example would be sorting by `MenuItem.Page.Date` where `Page` on `MenuItem` was a small subset of the bigger `page.Page` interface.
This commit fixes that by unwrapping such interface values.
Fixes #5989
|
|
Sadly, goorgeous has not been updated in over a year and still has a lot of
open issues (e.g. no support for nested lists).
go-org fixes most of those issues and supports a larger subset of Org mode
syntax.
|
|
|
|
Fixes #5999
|
|
According to google, this is no longer supported and structured data should be used instead: https://support.google.com/webmasters/answer/6083347?hl=en
|
|
|
|
There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0.
The reason have been narrowed down to that of parallel rebuilds.
This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization.
This commit fixes that by protecting the `Build` method with a lock when running in server mode.
Fixes #5885
Fixes #5968
|
|
To get fewer top level packages.
|
|
See #5926
|
|
In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.
This commit fixes that by making `HTML` by default sort before the others.
If this is not you want, you can set `weight` on the output format configuration.
Fixes #5910
|
|
This was broken in Hugo 0.55.0.
Fixes #5883
|
|
Fixes #5831
|
|
```bash
benchmark old ns/op new ns/op delta
BenchmarkSiteNew/Bundle_with_image-4 14572242 14382188 -1.30%
BenchmarkSiteNew/Bundle_with_JSON_file-4 13683922 13738196 +0.40%
BenchmarkSiteNew/Multiple_languages-4 41912231 25192494 -39.89%
benchmark old allocs new allocs delta
BenchmarkSiteNew/Bundle_with_image-4 57496 57493 -0.01%
BenchmarkSiteNew/Bundle_with_JSON_file-4 57492 57501 +0.02%
BenchmarkSiteNew/Multiple_languages-4 242422 118809 -50.99%
benchmark old bytes new bytes delta
BenchmarkSiteNew/Bundle_with_image-4 3845077 3844065 -0.03%
BenchmarkSiteNew/Bundle_with_JSON_file-4 3627442 3627798 +0.01%
BenchmarkSiteNew/Multiple_languages-4 13963502 7543885 -45.97%
```
Fixes #5890
|
|
This fixes a bug introduced in Hugo 0.55.
Fixes #5882
|
|
They were not correct for regular pages.
Fixes #5877
|
|
See #5877
|
|
In Hugo `0.55` we introduced the `permalinkable` config attribute on Output Format, default enabled for `AMP` and `HTML`.
This meant that a Page could have different `RelPermalink` and `Permalink` depending on the rendering format.
The menu `URL` did not reflect that fact.
Fixes #5849
|
|
See #5875
See #5852
|
|
See #5849
|
|
Which had some unpredictable behaviour when using `.Pages` on home page etc. that had a content page.
Fixes #5833
|
|
Fixes #5863
|
|
Add a slash to the check to make it less likely to match a valid value.
Fixes #5860
|
|
The faulty logic published the bundled resources for the "first output" format.
This worked most of the time, but since the output formats list is sorted,
any output format only used for some of the pages (e.g. CSS) would not work properly.
Fixes #5858
|
|
In Hugo 0.55 we connected the taxonomy nodes with their owning Page.
This failed if you had, say, a content file for a author that did not author anything in the site:
```
content/authors/silent-persin/_index.md
```
Fixes #5847
|
|
Fixes #5854
|
|
We introduced a callback func() to get the owner Page in 0.55.0.
Sadly, funcs is not comparable type in Go.
This commit replaces the func with a struct pointer that wraps the Page.
Fixes #5850
|
|
See #5833
|
|
|
|
This stopped working in Hugo 0.55:
```bash
---
menu: "main"
---
```
This was also the case for using a slice of menu entries.
This still worked:
---
menu:
main:
weight: 30
---
|
|
Fixes #5838
|
|
* Rewind paginator for server mode
* Add some more related tests.
* Replace the clumsy scratch constructs in internal paginator template with variables
See #5825
|
|
Will do this for one version only, as there may be situations where this is the correct thing.
Also add some more related test cases.
Fixes #5818
|
|
Add the ability to have a `summary` page variable that overrides
the auto-generated summary. Logic for obtaining summary becomes:
* if summary divider is present in content, use the text above it
* if summary variables is present in page metadata, use that
* auto-generate summary from first _x_ words of the content
Fixes #5800
|
|
See #5784
|
|
And use that to calculate number of workers, if set, else fall back to number of logical CPUs.
Also tweak the relevant related settings to match the new setup.
Also remove the setting of `runtime.GOMAXPROCS` as this has been the default behaviour since Go 1.5.
Fixes #5814
|
|
Fixes #5813
|
|
|
|
|
|
Note that this fixes some "live reload" issues recently introduced in non-released code.
Closes #5811
See #5784
|
|
Before this commit you would have to do this in multilingual setups:
```
---
title: "Custom!"
url: "/jp/custom/foo"
---
```
This commit allows for relative URLs, e.g:
```
---
title: "Custom!"
url: "custom/foo"
---
```
Which is obviously easier and more portable.
The meaning of relative may change to include more in the future (e.g. role based access).
Fixes #5704
|
|
Fixes #5757
|
|
This commit adds support for return values in partials.
This means that you can now do this and similar:
{{ $v := add . 42 }}
{{ return $v }}
Partials without a `return` statement will be rendered as before.
This works for both `partial` and `partialCached`.
Fixes #5783
|
|
Fixes #5760
|
|
Closes #5780
|