Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-09Fix typo s/Meny/Menu/Kaushal Modi
2019-07-07hugolib: Add testfile to .gitignoreBjørn Erik Pedersen
2019-06-26Include path to source page in non-relative ref/relref warningJustin Van Patten
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" >}} ```
2019-06-26hugolib: Add another site benchmarkBjørn Erik Pedersen
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.
2019-06-10tpl/collections: Fix slice type handling in sortBjørn Erik Pedersen
The `sort` template func was producing a `[]page.Page` which did not work in `.Paginate`. Fixes #6023
2019-06-09hugolib: Fix bundle path when slug is setBjørn Erik Pedersen
Fixes #4870
2019-06-09tpl/collections: Unwrap any interface value in sort and whereBjørn Erik Pedersen
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
2019-06-08Improve Org mode support: Replace goorgeous with go-orgNiklas Fasching
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.
2019-06-02Add safety barrier between concatenated javascript resourcesVincent Fiduccia
2019-05-29resources: Return nil when not found in resources.GetBjørn Erik Pedersen
Fixes #5999
2019-05-26Remove references to Google+Bruno Amaral
According to google, this is no longer supported and structured data should be used instead: https://support.google.com/webmasters/answer/6083347?hl=en
2019-05-18Merge branch 'release-0.55.6'Bjørn Erik Pedersen
2019-05-18hugolib: Prevent parallel server rebuildsBjørn Erik Pedersen
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
2019-05-04i18n: Move the package below /langsBjørn Erik Pedersen
To get fewer top level packages.
2019-05-03hugolib: Disable racy testBjørn Erik Pedersen
See #5926
2019-05-02output: Fix permalink in sitemap etc. when multiple permalinkable output formatsBjørn Erik Pedersen
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
2019-05-01hugolib: Fix PrevInSection/NextInSection for nested sectionsBjørn Erik Pedersen
This was broken in Hugo 0.55.0. Fixes #5883
2019-04-24hugolib: Fix shortcode version=1 logicBjørn Erik Pedersen
Fixes #5831
2019-04-24hugolib: Avoid recloning of shortcode templatesBjørn Erik Pedersen
```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
2019-04-22hugolib: No links for bundled pagesBjørn Erik Pedersen
This fixes a bug introduced in Hugo 0.55. Fixes #5882
2019-04-20Fix links for non-HTML output formatsBjørn Erik Pedersen
They were not correct for regular pages. Fixes #5877
2019-04-19hugolib: Add some OutputFormats.Get testsBjørn Erik Pedersen
See #5877
2019-04-19Fix menu URL when multiple permalinkable output formatsBjørn Erik Pedersen
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
2019-04-19hugolib: Add some integration tests for in/uniq using PagesBjørn Erik Pedersen
See #5875 See #5852
2019-04-17hugolib: Add more tests for PermalinkableBjørn Erik Pedersen
See #5849
2019-04-17hugolib: Fix Pages reinitialization on rebuildsBjørn Erik Pedersen
Which had some unpredictable behaviour when using `.Pages` on home page etc. that had a content page. Fixes #5833
2019-04-15hugolib: Fix shortcode namespace issueBjørn Erik Pedersen
Fixes #5863
2019-04-15hugolib: Fix false WARNINGs in lang prefix checkBjørn Erik Pedersen
Add a slash to the check to make it less likely to match a valid value. Fixes #5860
2019-04-15hugolib: Fix bundle resource publishing when multiple output formatsBjørn Erik Pedersen
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
2019-04-15hugolib: Fix panic for unused taxonomy content filesBjørn Erik Pedersen
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
2019-04-13hugolib: Fix dates for sections with dates in front matterBjørn Erik Pedersen
Fixes #5854
2019-04-13Fix WeightedPages in union etc.Bjørn Erik Pedersen
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
2019-04-12hugolib: Add a test for parent's resources in shortcodeBjørn Erik Pedersen
See #5833
2019-04-12FixBjørn Erik Pedersen
2019-04-12hugolib: Fix simple menu configBjørn Erik Pedersen
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 ---
2019-04-12Fix paginator refresh on server changeBjørn Erik Pedersen
Fixes #5838
2019-04-08Misc paginator adjustmentsBjørn Erik Pedersen
* Rewind paginator for server mode * Add some more related tests. * Replace the clumsy scratch constructs in internal paginator template with variables See #5825
2019-04-07hugolib: Log warning on relative front matter url with langBjørn Erik Pedersen
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
2019-04-05hugolib: Consider summary in front matter for .SummaryJim McDonald
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
2019-04-05hugolib: Fix default date assignment for sectionsBjørn Erik Pedersen
See #5784
2019-04-05Add HUGO_NUMWORKERMULTIPLIERBjørn Erik Pedersen
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
2019-04-05hugolib: Fix the GOMAXPROCS env getBjørn Erik Pedersen
Fixes #5813
2019-04-05hugolib: Fix benchmark for YAML front matterBjørn Erik Pedersen
2019-04-04hugolib: Buffer the render pages chanBjørn Erik Pedersen
2019-04-04hugolib: Re-work "fast render" logic in the new flowBjørn Erik Pedersen
Note that this fixes some "live reload" issues recently introduced in non-released code. Closes #5811 See #5784
2019-04-02hugolib: Allow relative URLs in front matterBjørn Erik Pedersen
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
2019-04-02hugolib: Allow page-relative aliasesBjørn Erik Pedersen
Fixes #5757
2019-04-02tpl: Allow the partial template func to return any typeBjørn Erik Pedersen
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
2019-03-30hugolib: Fix alias path for AMP and similarBjørn Erik Pedersen
Fixes #5760
2019-03-28hugolib: Add a simple test for jsonify of SiteBjørn Erik Pedersen
Closes #5780