summaryrefslogtreecommitdiffstats
path: root/hugolib
AgeCommit message (Collapse)Author
2019-11-23Add Goldmark as the new default markdown handlerBjørn Erik Pedersen
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo. If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration: ```toml [markup] defaultMarkdownHandler="blackfriday" ``` Fixes #5963 Fixes #1778 Fixes #6355
2019-11-22Fix Params case handling in the index, sort and where funcBjørn Erik Pedersen
This means that you can now do: ``` {{ range where .Site.Pages "Params.MYPARAM" "foo" }} ```
2019-11-22Fix GetPage Params case issueBjørn Erik Pedersen
Fixes #5946
2019-11-17hugolib: Add a benchmarkBjørn Erik Pedersen
2019-11-14hugolib: Fix emoji handling inside shortcodesBjørn Erik Pedersen
Fixes #6504
2019-11-10hubolib: Headless bundles should not be listed in .PagesBjørn Erik Pedersen
Fixes #6492
2019-11-06Prepare for GoldmarkBjørn Erik Pedersen
This commmit prepares for the addition of Goldmark as the new Markdown renderer in Hugo. This introduces a new `markup` package with some common interfaces and each implementation in its own package. See #5963
2019-11-06hugolib: Fix ref/relref anhcor handlingBjørn Erik Pedersen
Fixes #6481
2019-10-31hugofs: Fix crash in multilingual content fsBjørn Erik Pedersen
Fixes #6463
2019-10-28Adjust benchmark templatesBjørn Erik Pedersen
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-12tpl: Add optional "title" attribute to iframe in Vimeo shortcodeZach Bayoff
Add an optional "title" attribute to the iframe in the vimeo shortcode. If one is not given, the title attribute will default to "vimeo video". It is imperative for iframes to have a non-empty "title" attribute in order to meet WCAG2.0 accessibility guidelines https://www.w3.org/TR/WCAG20-TECHS/H64.
2019-10-10tpl: Make getJSON/getCVS accept non-string argsBjørn Erik Pedersen
This broke for the Twitter simple shortcode now that Shortcodes accepts typed arguments. Fixes #6382
2019-10-09Simplify test output to simplify diffingBjørn Erik Pedersen
2019-10-09deps: Update minify to v2.5.2Anthony Fok
- v2.5.1 removes import comments, solving a build error with Go 1.13 in GOPATH mode (used Debian packaging for example) - v2.5.2 no longer converts polyline/rect/polygon/line to path as it has been reported to break a SVG referenced by CSS, see tdewolff/minify#260 The test case for Min SVG in TestResourceChains is updated accordingly. Fixes pocc/tshark.dev#33
2019-10-07Add BaseFs to RenderingContextNiklas Fasching
The org mode renderer supports including other files [1]. We don't want to allow reading of arbitrary files (go-org defaults to ioutil.ReadFile [2]) but want to make use of the FileSystem abstractions hugo provides. For starters we will allow reading from the content directory only [1]: e.g. `#+INCLUDE: ./foo.py src python` includes `foo.py` as a python source block.
2019-09-29Support typed bool, int and float in shortcode paramsBjørn Erik Pedersen
This means that you now can do: {{< vidur 9KvBeKu false true 32 3.14 >}} And the boolean and numeric values will be converted to `bool`, `int` and `float64`. If you want these to be strings, they must be quoted: {{< vidur 9KvBeKu "false" "true" "32" "3.14" >}} Fixes #6371
2019-09-19Add some more resource transform testsBjørn Erik Pedersen
See #6348
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-06hugolib: Fix broken bundle live reload logicBjørn Erik Pedersen
Fixes #6315 Updates #6308
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-04hugolib: Adjust Go version specific testBjørn Erik Pedersen
See #6304
2019-09-03hugolib: Remove the old and slow site benchmarksBjørn Erik Pedersen
2019-09-03Cache processed images by their source pathBjørn Erik Pedersen
Fixes #6269
2019-09-03Remove test artifactBjørn Erik Pedersen
2019-09-03Make the "is this a Hugo Module" logic more lenientBjørn Erik Pedersen
Now we only try to load modules via Go if there is one or more modules imported in project config. Fixes #6299
2019-09-03hugolib: Add a Sass includePaths testBjørn Erik Pedersen
See #6274
2019-09-02Make home.Pages work like any other sectionBjørn Erik Pedersen
Fixes #6240
2019-09-02Add some fingerprint testsBjørn Erik Pedersen
Closes #6284 Closes #6280
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-01Remove metaDataFormat settingBjørn Erik Pedersen
Not in use anymore.
2019-08-30tpl: Migrate last shortcodes (YouTube and Vimeo) to HTTPS embedsJake Jarvis
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-22hugolib: Change to output non-panic error message if missing shortcode templateVazrupe (HyeonGyu Lee)
A panic occurred when the `nested` variable was nil. Changed to check if the `nested` variable is nil. Fixes #6075
2019-08-17hugolib: Don't use the global warning loggerBjørn Erik Pedersen
See #6238
2019-08-17hugolib: Allow index.md inside bundlesBjørn Erik Pedersen
Fixes #6208
2019-08-17Adjust the default paginator for sectionsBjørn Erik Pedersen
To make it in line with 0.56 for sections; only paginate regular pages. Fixes #6231
2019-08-17Revert the 0.57 home.Pages changeBjørn Erik Pedersen
In 0.57 we change the behaviour of home.Pages to be in line with the other sections. This has created a lot noise and breakage in the wild. This commit reverts that change, but adds a warning that we will change this in 0.58 and that you should consider using .Site.RegularPages if that is what you want.
2019-08-16hugolib: Add a site benchmarkBjørn Erik Pedersen
2019-08-15hugolib: Fix draft etc. handling of _index.md pagesBjørn Erik Pedersen
We will need to revisit this with a proper spec, but this commit makes sure that draft/expiryDate etc. set in front matter on _index.md content files that should disable the page will: * Not crash * Make the rendered page not render any `.Content`. Fixes #6222 Fixes #6210
2019-08-15Fix mainSections logicBjørn Erik Pedersen
Fixes #6217
2019-08-15Fix live reload mount logic with sub pathsBjørn Erik Pedersen
Fixes #6209
2019-08-15hugolib: Recover and log panics in content initBjørn Erik Pedersen
See #6210
2019-08-15hugolib: Add some outputs testsBjørn Erik Pedersen
See #6210
2019-08-15hugolib: Fix taxonomies vs expiredBjørn Erik Pedersen
In Hugo 0.57 we needed to delay the page metadata initialization until we had built the page graph. This introduced a regression in that we now created taxonomy entries for expired pages. This fixes that by moving the "should not build" filter before we assemble the taxonomies. Fixes #6213