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
2022-06-14resources: Panic on Copy of Resource with .ErrBjørn Erik Pedersen
Fixes #10006
2022-06-13resources/page: Add :slugorfilename attributeDawid Potocki
Fixes #4739, #385
2022-06-12js: Resolve index.esm.jsBjørn Erik Pedersen
Same logic as for `index.{js,ts...}` files applies; if both `index.esm.js` and `index.js` exists (unlikely), you need to use the name with extension when importing, else the `index.js` will win. Fixes #8631
2022-06-12Add animated GIF supportBjørn Erik Pedersen
Note that this is for GIFs only (and not Webp). Fixes #5030
2022-06-12resources: Add a Gif source file to golden testsBjørn Erik Pedersen
2022-05-27Don't use the baseURL /path as part of the resource cache keyBjørn Erik Pedersen
As that prevents Hugo projects with sub paths in their `baseURL` to use themes with cached resources. Fixes #9787
2022-05-27postcss: Make the resource cache key more stableBjørn Erik Pedersen
By using the input map as the basis, which means the hash will not change if we add/rename/remove options. This happened in Hugo 0.99, as we added a new options. This is unortunate. Unfortunately this means that the cache keys for PostCSS will change one more time in 0.100, but will be stable going forward. Note that we have implemented this pattern in all the other resource transformers. Updates #9787
2022-05-27github: Set HUGO_BUILD_TAGS: extended when running testsBjørn Erik Pedersen
Also fix TestDecodeConfig/Basic which started to fail in the extended build in 0.99.1. Closes #9935
2022-05-25Fix error message when PostCSS config file is not foundBjørn Erik Pedersen
Fixes #9927
2022-05-25resources: Improve error message on .Resize etc. on SVGsBjørn Erik Pedersen
Fixes #9875
2022-05-25Add resources.CopyBjørn Erik Pedersen
Implemented by most Resource objects, but not Page (for now). Fixes #9313
2022-05-15Improve SASS errorsBjørn Erik Pedersen
Fixes #9897
2022-05-15postcss: Fix import error handlingBjørn Erik Pedersen
Note that we will now fail if `inlineImports` is enabled and we cannot resolve an import. You can work around this by either: * Use url imports or imports with media queries. * Set `skipInlineImportsNotFound=true` in the options Also get the argument order in the different NewFileError* funcs in line. Fixes #9895
2022-05-14errors: Misc improvementsBjørn Erik Pedersen
* Redo the server error template * Always add the content file context if relevant * Remove some now superflous error string matching * Move the server error template to _server/error.html * Add file context (with position) to codeblock render blocks * Improve JS build errors Fixes #9892 Fixes #9891 Fixes #9893
2022-05-14postcss: Fix line numbers in error messagesBjørn Erik Pedersen
Fixes #9880
2022-05-13js: Bump test dependencyBjørn Erik Pedersen
To work around a cache issue.
2022-05-08Add `clock` cli flagsatotake
Close #8787
2022-05-06Improve error messages, esp. when the server is runningBjørn Erik Pedersen
* Add file context to minifier errors when publishing * Misc fixes (see issues) * Allow custom server error template in layouts/server/error.html To get to this, this commit also cleans up and simplifies the code surrounding errors and files. This also removes the usage of `github.com/pkg/errors`, mostly because of https://github.com/pkg/errors/issues/223 -- but also because most of this is now built-in to Go. Fixes #9852 Fixes #9857 Fixes #9863
2022-04-28Some godoc adjustments and image struct renamesBjørn Erik Pedersen
2022-04-23Some godoc adjustmentsBjørn Erik Pedersen
2022-04-23resources/page: Mark some more interface methods as internalBjørn Erik Pedersen
For the new documenttion.
2022-04-23Deprecate page.Author and page.AuthorsBjørn Erik Pedersen
These are not documented, and they don't belong on Page. We should consider having author a first class citizen of Hugo, but as it is not it's better modelled as a taxonomy.
2022-04-16Fix MediaType when reading images from cacheBjørn Erik Pedersen
Fixes #8931
2022-04-13resources: Add `key` to reources.GetRemote options mapBjørn Erik Pedersen
If set, `key` will be used as the only cache key element for the resource. The default behaviour is to calculate the key based on the URL and all the options. This means that you can now do: ``` {{ $cacheKey := print $url (now.Format "2006-01-02") }} {{ $resource := resource.GetRemote $url (dict "key" $cacheKey) }} ``` Fixes #9755
2022-04-12Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language awareBjørn Erik Pedersen
Fixes #2180
2022-04-08Rework the Destination filesystem to make --renderStaticToDisk workBjørn Erik Pedersen
See #9626
2022-04-05resources: Create a common ResourceFinder interfaceBjørn Erik Pedersen
And make both .Resources and resources implement it. This gets us 2 new methods/functions, so you can now also do: * .Resources.Get * resources.ByType Note that GetRemote is not covered by this interface, as that is only available as a global template function. Fixes #8653
2022-04-05Localize all the GroupBy*Date methodsBjørn Erik Pedersen
Fixes #9745
2022-04-05Add environment as a new filter to _cascade.targetCathrine Paulsen
Fixes #9612
2022-03-25resources: Add more details to .ErrBjørn Erik Pedersen
This commit adds a .Data object (a map with `Body`, `StatusCode` etc.) to the .Err returned from `resources.GetRemote`, which means you can now do: ``` {{ with .Err }} {{ range $k, $v := .Data }} {{ end }} {{ end }} ``` Fixes #9708
2022-03-22Fix some typoscuishuang
Signed-off-by: cuishuang <imcusg@gmail.com> [foka@debian.org: Resolve merge conflict and squash 2 commits] Signed-off-by: Anthony Fok <foka@debian.org>
2022-03-20resources/images: Require width and height for Crop, Fill, and FitJoe Mooring
Closes #9696
2022-03-18all: gofmt -w -r 'interface{} -> any' .Bjørn Erik Pedersen
Updates #9687
2022-03-17dartsass: Enable deprecation, @warn and @debug loggingBjørn Erik Pedersen
* @warn and Sass deprecations are printed as WARN * @debug is currently logged as INFO (needs the `--verbose` flag). We may adjust this if it gets too chatty. Fixes #9683
2022-03-15dartsass: Improve error message when no read accessBjørn Erik Pedersen
Fixes #9662
2022-03-09minifiers: Make keepWhitespace = false default for HTML (note)Joe Mooring
Closes #9456
2022-03-08Cache reflect.MethodByNameBjørn Erik Pedersen
The isolated benchmark for the function is obviously much faster: ```bash name old time/op new time/op delta GetMethodByName-10 1.21µs ± 7% 0.23µs ± 5% -81.42% (p=0.029 n=4+4) name old alloc/op new alloc/op delta GetMethodByName-10 680B ± 0% 0B -100.00% (p=0.029 n=4+4) name old allocs/op new allocs/op delta GetMethodByName-10 20.0 ± 0% 0.0 -100.00% (p=0.029 n=4+4) ``` But more pleasing is the overall performance looking at the site benchmarks: ```bash name old time/op new time/op delta SiteNew/Regular_Bundle_with_image-10 6.25ms ± 2% 6.10ms ± 2% ~ (p=0.057 n=4+4) SiteNew/Regular_Bundle_with_JSON_file-10 6.30ms ± 2% 5.66ms ±11% ~ (p=0.057 n=4+4) SiteNew/Regular_Tags_and_categories-10 22.2ms ± 2% 17.4ms ± 1% -21.88% (p=0.029 n=4+4) SiteNew/Regular_Canonify_URLs-10 108ms ± 0% 107ms ± 0% -1.20% (p=0.029 n=4+4) SiteNew/Regular_Deep_content_tree-10 36.1ms ± 1% 33.8ms ± 1% -6.44% (p=0.029 n=4+4) SiteNew/Regular_TOML_front_matter-10 24.9ms ± 1% 22.6ms ± 1% -9.30% (p=0.029 n=4+4) SiteNew/Regular_Many_HTML_templates-10 17.9ms ± 1% 16.7ms ± 1% -6.43% (p=0.029 n=4+4) SiteNew/Regular_Page_collections-10 23.3ms ± 1% 22.0ms ± 0% -5.58% (p=0.029 n=4+4) SiteNew/Regular_List_terms-10 8.00ms ± 1% 7.63ms ± 0% -4.62% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Regular_Bundle_with_image-10 2.10MB ± 0% 2.07MB ± 0% -1.46% (p=0.029 n=4+4) SiteNew/Regular_Bundle_with_JSON_file-10 1.88MB ± 0% 1.85MB ± 0% -1.76% (p=0.029 n=4+4) SiteNew/Regular_Tags_and_categories-10 13.5MB ± 0% 11.6MB ± 0% -13.99% (p=0.029 n=4+4) SiteNew/Regular_Canonify_URLs-10 96.1MB ± 0% 95.8MB ± 0% -0.40% (p=0.029 n=4+4) SiteNew/Regular_Deep_content_tree-10 28.4MB ± 0% 27.3MB ± 0% -3.83% (p=0.029 n=4+4) SiteNew/Regular_TOML_front_matter-10 16.9MB ± 0% 15.1MB ± 0% -10.58% (p=0.029 n=4+4) SiteNew/Regular_Many_HTML_templates-10 8.98MB ± 0% 8.44MB ± 0% -6.04% (p=0.029 n=4+4) SiteNew/Regular_Page_collections-10 17.1MB ± 0% 16.5MB ± 0% -3.91% (p=0.029 n=4+4) SiteNew/Regular_List_terms-10 3.92MB ± 0% 3.72MB ± 0% -5.03% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Regular_Bundle_with_image-10 25.8k ± 0% 24.9k ± 0% -3.49% (p=0.029 n=4+4) SiteNew/Regular_Bundle_with_JSON_file-10 25.8k ± 0% 24.9k ± 0% -3.49% (p=0.029 n=4+4) SiteNew/Regular_Tags_and_categories-10 288k ± 0% 233k ± 0% -18.90% (p=0.029 n=4+4) SiteNew/Regular_Canonify_URLs-10 375k ± 0% 364k ± 0% -2.80% (p=0.029 n=4+4) SiteNew/Regular_Deep_content_tree-10 314k ± 0% 283k ± 0% -9.77% (p=0.029 n=4+4) SiteNew/Regular_TOML_front_matter-10 302k ± 0% 252k ± 0% -16.55% (p=0.029 n=4+4) SiteNew/Regular_Many_HTML_templates-10 133k ± 0% 117k ± 0% -11.81% (p=0.029 n=4+4) SiteNew/Regular_Page_collections-10 202k ± 0% 183k ± 0% -9.55% (p=0.029 n=4+4) SiteNew/Regular_List_terms-10 55.6k ± 0% 49.8k ± 0% -10.40% (p=0.029 n=4+4) ``` Thanks to @quasilyte for the suggestion. Fixes 9386
2022-02-27Rename Codeowners() to CodeOwners()Bjørn Erik Pedersen
2022-02-24Add Markdown diagrams and render hooks for code blocksBjørn Erik Pedersen
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`). We also used this new hook to add support for diagrams in Hugo: * Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams. * Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information. Updates #7765 Closes #9538 Fixes #9553 Fixes #8520 Fixes #6702 Fixes #9558
2022-02-24Add support for CODEOWNERSMarshall Cottrell
Fixes #9474
2022-02-23Add page.StoreBjørn Erik Pedersen
Fixes #9546
2022-02-23Allow images to be cropped without being resizedJohn Elliott
Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation. Fixes #9499
2022-02-14Finally remove deprecated Page methodsBjørn Erik Pedersen
They have been deprecated for a very long time, first with a warning, then with an ERROR. Now they are removed. Closes #4117
2022-02-10Simplify some integration testsBjørn Erik Pedersen
2022-02-10Fix validation of Page Kind in cascade target mapJoe Mooring
Fixes #8888
2022-02-09babel: Port integration tests to their own packageBjørn Erik Pedersen
2022-02-09js: Port integration tests to its own packageBjørn Erik Pedersen
2022-02-09postcss: Move integration test to its own packageBjørn Erik Pedersen
2022-02-09minifier: Port integration tests to its packageBjørn Erik Pedersen
2022-02-09templates: Port integration test to its packageBjørn Erik Pedersen