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-10-20resources/images: Allow to set background fill colourBjørn Erik Pedersen
Closes #6298
2019-10-13resources/page: Use binary search in Pages.Prev/Next if possibleBjørn Erik Pedersen
This is obviously much faster for lager data sets: ```bash name old time/op new time/op delta SearchPage/ByWeight-100-4 267ns ± 4% 272ns ± 5% ~ (p=0.457 n=4+4) SearchPage/ByWeight-5000-4 10.8µs ± 3% 1.2µs ± 2% -88.99% (p=0.029 n=4+4) SearchPage/ByWeight-10000-4 21.1µs ± 1% 1.4µs ±11% -93.28% (p=0.029 n=4+4) ``` See #4500
2019-10-13Make Pages.Prev/Next work like the other Prev/Next methodsBjørn Erik Pedersen
Fixes #4500
2019-10-07resources: Fix image test error on s390x, ppc64* and arm64Anthony Fok
In TestImageOperationsGolden, tolerate slight floating-point rounding differences due to the use or non-use of "fused multiply and add" (FMA) instruction on different architectures. Special thanks to @disintegration for the solution in goldenEqual(); see https://github.com/disintegration/gift/issues/20 Fixes #6387
2019-10-03resources: Ensure same dirinfos sort order in TestImageOperationsGoldenAnthony Fok
Fix filename mismatch errors on Debian auto-building machines possibly due to different directory order on ext4 vs tmpfs file systems.
2019-09-21resources: Support output image format in image operationsJ. Ansorg
The image format is defined as the image extension of the known formats, excluding the dot. All of 'img.Resize "600x jpeg"', 'img.Resize "600x jpg"', and 'img.Resize "600x png"' are valid format definitions. If the target format is defined in the operation definition string, then the converted image will be stored in this format. Permalinks and media type are updated correspondingly. Unknown image extensions in the operation definition have not effect. See #6298
2019-09-19Fix cache key transformed resourcesBjørn Erik Pedersen
Fixes #6348
2019-09-12Fix cache keys for bundled resoures in transform.UnmarshalBjørn Erik Pedersen
Fixes #6327
2019-09-06Avoid writing the same processed image to /public twiceBjørn Erik Pedersen
Fixes #6307
2019-09-05Fix concat with fingerprint regressionBjørn Erik Pedersen
In Hugo 0.58 we optimized the transformers that only adjusted metadata, e.g. the fingerprint. This depended on the source readers implementing `io.ReadSeeker`. The reader produced by `concat` did that, but the implementation was buggy. This commit fixes that. Fixes #6309
2019-09-04Allow slices in the image Filter funcs, not just varargsBjørn Erik Pedersen
[ci skip] See #6255
2019-09-03Cache processed images by their source pathBjørn Erik Pedersen
Fixes #6269
2019-09-02resources: Cache Exif data to diskBjørn Erik Pedersen
```bash name old time/op new time/op delta ImageExif/Cold_cache-4 312µs ±28% 355µs ± 7% ~ (p=0.343 n=4+4) ImageExif/Cold_cache,_10-4 479µs ± 6% 546µs ± 0% +13.91% (p=0.029 n=4+4) ImageExif/Warm_cache-4 272µs ± 1% 81µs ± 5% -70.30% (p=0.029 n=4+4) name old alloc/op new alloc/op delta ImageExif/Cold_cache-4 151kB ± 0% 161kB ± 0% +6.46% (p=0.029 n=4+4) ImageExif/Cold_cache,_10-4 179kB ± 0% 189kB ± 0% +5.49% (p=0.029 n=4+4) ImageExif/Warm_cache-4 151kB ± 0% 13kB ± 0% -91.52% (p=0.029 n=4+4) name old allocs/op new allocs/op delta ImageExif/Cold_cache-4 1.03k ± 0% 1.21k ± 0% +17.78% (p=0.029 n=4+4) ImageExif/Cold_cache,_10-4 1.65k ± 0% 1.83k ± 0% +11.09% (p=0.029 n=4+4) ImageExif/Warm_cache-4 1.03k ± 0% 0.28k ± 0% -72.40% (p=0.029 n=4+4) ``` Fixes #6291
2019-09-01resources: Make the Exif benchmark filenames distinctBjørn Erik Pedersen
2019-09-01resources: Add Exif benchmarkBjørn Erik Pedersen
See #6291
2019-08-31resources: Remove unused map typeBjørn Erik Pedersen
2019-08-31Add image.ExifBjørn Erik Pedersen
Note that we will probably need to add some metadata cache for this to scale. Fixes #4600
2019-08-28Add a set of image filtersBjørn Erik Pedersen
With this you can do variants of this: ``` {{ $img := resources.Get "images/misc/3-jenny.jpg" }} {{ $img := $img.Resize "300x" }} {{ $g1 := $img.Filter images.Grayscale }} {{ $g2 := $img | images.Filter (images.Saturate 30) (images.GaussianBlur 3) }} ``` Fixes #6255
2019-08-26Image resource refactorBjørn Erik Pedersen
This commit pulls most of the image related logic into its own package, to make it easier to reason about and extend. This is also a rewrite of the transformation logic used in Hugo Pipes, mostly to allow constructs like the one below: {{ ($myimg | fingerprint ).Width }} Fixes #5903 Fixes #6234 Fixes #6266
2019-08-23Discrepancy typo fixChristian Oliff
2019-08-13Add FileInfo to resources created with resources.Match etc.Bjørn Erik Pedersen
Without it, image resize fails. See #6190
2019-08-13Improve the server assets cache invalidation logicBjørn Erik Pedersen
Fixes #6199
2019-08-13Add resources.Match and resources.GetMatchBjørn Erik Pedersen
Fix #6190
2019-08-12tests: Convert from testify to quicktestBjørn Erik Pedersen
2019-08-10Avoid unnecessary conversionsChristian Muehlhaeuser
No need to convert these types.
2019-08-10Fixed tautological error conditionsChristian Muehlhaeuser
Drop error & nil checks where the value can not have changed.
2019-08-08Simplify page tree logicBjørn Erik Pedersen
This is preparation for #6041. For historic reasons, the code for bulding the section tree and the taxonomies were very much separate. This works, but makes it hard to extend, maintain, and possibly not so fast as it could be. This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues: This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix. Fixes #6154 Fixes #6153 Fixes #6152
2019-08-05postcss: Fix no-map vs noMap discrepancyBjørn Erik Pedersen
Fixes #6166
2019-08-05hugolib: Fix output format handling of mix cased page kindsBjørn Erik Pedersen
Fixes #4528
2019-08-01Fix assorted typosXhmikosR
2019-08-01Merge pull request #6149 from bep/sort-caseinsensitiveBjørn Erik Pedersen
Implement lexicographically string sorting
2019-07-30Fix image format detection for upper case extensions, e.g. JPGBjørn Erik Pedersen
This regression was introduced in 0.56.0. Fixes #6137
2019-07-29Add proper error message when receiving nil in Resource transformationBjørn Erik Pedersen
Closes #6128
2019-07-28resources: Fix image Width/Height regressionBjørn Erik Pedersen
Fixes #6120
2019-07-25resources: Fix test on WindowsBjørn Erik Pedersen
2019-07-25Block symlink dir traversal for /staticBjørn Erik Pedersen
This is in line with how it behaved before, but it was lifted a little for the project mount for Hugo Modules, but that could create hard-to-detect loops.
2019-07-24Add Hugo ModulesBjørn Erik Pedersen
This commit implements Hugo Modules. This is a broad subject, but some keywords include: * A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project. * A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects. * Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running. * Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions. * A new set of CLI commands are provided to manage all of this: `hugo mod init`, `hugo mod get`, `hugo mod graph`, `hugo mod tidy`, and `hugo mod vendor`. All of the above is backed by Go Modules. Fixes #5973 Fixes #5996 Fixes #6010 Fixes #5911 Fixes #5940 Fixes #6074 Fixes #6082 Fixes #6092
2019-07-16resource/postcss: Change postcss to check for local installation under ↵Eric Selin
node_modules/.bin Fixes #5091
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-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-04-20Fix links for non-HTML output formatsBjørn Erik Pedersen
They were not correct for regular pages. Fixes #5877
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-09resources/page: Fix .RSSLinke deprecation messageBjørn Erik Pedersen
Closes #4427
2019-04-05resources/page: Regenerate JSON wrapperBjørn Erik Pedersen
2019-04-05resources/page: Add missing GitInfo to PageBjørn Erik Pedersen
2019-04-05integrity: Add support for sha384Bjørn Erik Pedersen
Fixes #5815
2019-04-02resources/page: Implement compare.ProbablyEqer for the core slicesBjørn Erik Pedersen
Fixes #5808