summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-01-27releaser: Bump versions for release of 0.92.1v0.92.1hugoreleaser
[ci skip]
2022-01-27releaser: Add release notes for 0.92.1hugoreleaser
[ci skip]
2022-01-27Make the RenderString content provider fix more generalBjørn Erik Pedersen
Updates #9383
2022-01-27Fix .RenderString issue in .TranslationsPaul Gottschling
Fixes #9383
2022-01-27general: Fix issue causing log threads to hang indefinitely when print() panicsEphex2
The function printIfNotPrinted() defined for DistinctLogger unlocked the mutex within the logger only after the print() function ran. If print panics, the mutex would stay locked and future attempts to read or write from the logger mutex would cause the goroutine to hang indefinitely. Deferred the unlocking of the mutex to prevent this. Also, put l.m[key] before the print() call since this will prevent another bug where the same warning potentially gets logged multiple times if the print() call panics. Fixes #9380
2022-01-26Fix duplicate mount sourcesBjørn Erik Pedersen
Fixes #9426
2022-01-17tpl/collections: Fix apply with namespaced template funcsBjørn Erik Pedersen
We changed the signature to `func(...interface{}) (interface{}, error)` some time ago, but sadly we had no test for this for `apply`. Now we do. Fixes #9393
2022-01-16common: Remove unused codeBjørn Erik Pedersen
2022-01-16common/paths: Remove unused codeBjørn Erik Pedersen
2022-01-16helpers: Remove unused codeBjørn Erik Pedersen
2022-01-16Do not render hl_style as an HTML attributeJoe Mooring
Fixes #9390
2022-01-14build(deps): bump github.com/spf13/viper from 1.8.1 to 1.10.1dependabot[bot]
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.8.1 to 1.10.1. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.8.1...v1.10.1) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-01-14Fixing typos (#9387)Andreas Deininger
2022-01-13Fix typo in warning messageAndreas Deininger
2022-01-13github: Clean up the issue templates a littleBjørn Erik Pedersen
2022-01-12github: Add lock-threads stepBjørn Erik Pedersen
2022-01-12releaser: Prepare repository for 0.93.0-DEVhugoreleaser
[ci skip]
2022-01-12releaser: Bump versions for release of 0.92.0v0.92.0hugoreleaser
[ci skip]
2022-01-12releaser: Add release notes for 0.92.0hugoreleaser
[ci skip]
2022-01-12docs: Regenerate docshelperBjørn Erik Pedersen
2022-01-12Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb'Bjørn Erik Pedersen
2022-01-12Squashed 'docs/' changes from 4eb10c1a9..b8b20e9a2Bjørn Erik Pedersen
b8b20e9a2 Update index.md f33994fe6 Remove files.Extension (duplicate of files.Ext) 948d6d69d layouts: Use .File.Path d3050b78c Document .Page.BundleType (#1620) 8a033918f Image filters: ensure Grayscale is a level-2 heading 98537018f Document .Publish method for global resources 963ddc994 docs: add a link to the mailmap documentation 915f858dc Fix release notes version 58093dafe Update index.md 8008ba1e1 Release 0.91.2 d1788dae8 Merge branch 'tempv0.91.2' af2970180 Revert "config/security: Add HOME to default exec env var whitelist" 2648d3088 netlify: Hugo 0.91.1 d0801599c Merge branch 'tempv0.91.1' b343bfd7a config/security: Add HOME to default exec env var whitelist 03fbb403f Update data-templates.md 2f608055f Correct GetRemote docs and examples 4e942166a Update 2021-12-17-no-more-releasenotes.md dbf9514fd Update security.toml 2c38aa356 Update index.md 562ad8e96 Add timeZone 4bc482152 Update introduction.md 1eb66c758 news: Add a note about the placement of release notes b2a293abb Remove the default archetype template f9837793c netlify: Hugo 0.91.0 467256ad5 docs: Regen docs helper 68554cf77 Add some basic security policies with sensible defaults git-subtree-dir: docs git-subtree-split: b8b20e9a257dca8e53ca9e5f314cf54b18702a37
2022-01-12Only create LazyContentProvider for the non-rendering SiteBjørn Erik Pedersen
Which saves a fair amound of allocations: ``` gobench --package ./hugolib --bench "SiteNew/Regular_D" --base master ``` Before: ``` name old time/op new time/op delta SiteNew/Regular_Deep_content_tree-10 40.7ms ± 3% 41.2ms ± 1% ~ (p=0.343 n=4+4) name old alloc/op new alloc/op delta SiteNew/Regular_Deep_content_tree-10 27.7MB ± 0% 28.8MB ± 0% +3.76% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Regular_Deep_content_tree-10 304k ± 0% 329k ± 0% +8.07% (p=0.029 n=4+4) ``` After: ``` name old time/op new time/op delta SiteNew/Regular_Deep_content_tree-10 34.2ms ± 1% 34.7ms ± 1% ~ (p=0.114 n=4+4) name old alloc/op new alloc/op delta SiteNew/Regular_Deep_content_tree-10 27.7MB ± 0% 28.1MB ± 0% +1.38% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Regular_Deep_content_tree-10 304k ± 0% 314k ± 0% +3.03% (p=0.029 n=4+4) ``` Updates #8919
2022-01-12Fix missing page data for alternative formatsPaul Gottschling
When a template calls the .Translations function and a Hugo environment is using multiple output formats, a template that calls methods like .Summary and .Len on each translation will unexpectedly show empty return values for these methods. This is because each pageOutput's ContentProvider is assigned to a page.NopPage in newPageOutput. When *HugoSites.render assigns pageContentOutputs to pageOutputs in *pageState.shiftToOutputFormat, it reuses pageContentOutputs from other pageOutputs, leaving some pageContentOutputs as NopPages. While this approach conserves resources, sometimes it means that a template will unexpectedly call a method on a pageContentOutput that is actually a NopPage. In the case of ContentProvider methods called on translations for alternative output formats, the methods were called on NopPages. This change introduces LazyContentProvider, which performs late initialization when one of its methods is called. This way, we can reuse content in "normal" cases but ensure that ContentProvider methods work as expected when a pageOutput is not assigned a pageContentOutput during the initial pre-render phase. Fixes #8919
2022-01-11docs: Add dependency table to maintainance pageBjørn Erik Pedersen
See #8949
2022-01-11deps: Upgrade github.com/evanw/esbuild v0.14.8 => v0.14.11Bjørn Erik Pedersen
2022-01-11Add hugo.DepsBjørn Erik Pedersen
Fixes #8949
2022-01-08hugolib: Fix livereload problem with files including NFC characters in MacOsroointan
Fixes #8429
2022-01-07docs. Regen CLI docsBjørn Erik Pedersen
Closes #9363
2022-01-07commands: Fix CLI help text for hugo newBjørn Erik Pedersen
Updates #9363
2022-01-07Update to Go 1.17.6Bjørn Erik Pedersen
Fixes #9361
2022-01-07create: Correctly pass newContentEditor flagsJoe Mooring
Fixes #9356
2022-01-06Add --panicOnWarning flagBjørn Erik Pedersen
Fixes #9357 Fixes #9359
2022-01-05github: Increase stale daysBjørn Erik Pedersen
2022-01-04docs: Regenerate CLI docsBjørn Erik Pedersen
2022-01-04docs: Regenerate docshelperBjørn Erik Pedersen
2022-01-04Remove mmarkBjørn Erik Pedersen
Closes #9350
2022-01-04Misc depreation updatesBjørn Erik Pedersen
* Deprecate .Page.Path when backed by a file * site.Permalinks * --ignoreVendor (use --ignoreVendorPaths) Closes #9348 Closes #9349
2022-01-04Make the deprecated Page/File methods (from Hugo 0.55) ERRORBjørn Erik Pedersen
Closes #9346
2022-01-04github: Add add stale GitHub actionBjørn Erik Pedersen
2022-01-04Fix surprise OutputFormat.Rel overwritingPaul Gottschling
In page.NewOutputFormat, we take an output.Format f and use it to create a page.OutputFormat. If the format is canonical, we assign the final OutputFormat's Rel to "canonical" rather than using f.Rel. However, this leads to unexpected behavior for custom output formats, where a user can define a "rel" for a format via the config file. For example, the standard for "humans.txt" files requires using rel="author" in HTML "link" elements. Meanwhile, humans.txt is usually the only format used for its content. As a result, for Hugo configurations that define a humans.txt custom output format, Hugo will render "link" elements to content in this format with rel="canonical," rather than "author" as required by the standard. This commit changes page.NewOutputFormat to check whether a given format is user defined and, if so, skips assigning Rel to "canonical," even if isCanonical is true. Fixes #8030
2022-01-01hugolib: Make an RST test optionalBjørn Erik Pedersen
If no RST installed.
2021-12-30deps: Upgrade github.com/niklasfasching/go-org v1.5.0 => v1.6.0Joe Mooring
Fixes #8921
2021-12-30Update stale.ymlBjørn Erik Pedersen
2021-12-23releaser: Prepare repository for 0.92.0-DEVhugoreleaser
[ci skip]
2021-12-23releaser: Bump versions for release of 0.91.2v0.91.2hugoreleaser
[ci skip]
2021-12-23releaser: Add release notes for 0.91.2hugoreleaser
[ci skip]
2021-12-23Revert "config/security: Add HOME to default exec env var whitelist"Bjørn Erik Pedersen
There have been one report in the wild suggesting that this needs to be tested better before doing: https://discourse.gohugo.io/t/hugo-mod-failing-in-v0-91-1-but-works-in-v0-91-0/36180/5 This reverts commit fca266ebbb81af3d4479873a7a79759033c7ce25.
2021-12-23Make sure we always create the /public folderBjørn Erik Pedersen
* Before this commit, when you had static files in the root of /content and no /public folder, that folder would not be created unless the /static syncer had already run. * So, with a common pattern doing `rm -rf public && hugo` would the fail now and then because /static and /content are processed in parallel (unless you have cleanDestinationDir=true) * This was even worse before commit 0b918e131fe523188b820d1e3fa0b08251abde69 – a frozen build. Closes #8166
2021-12-23Fix "stuck on build" in error situations in content processingBjørn Erik Pedersen
Updates #8166