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
path: root/tpl
AgeCommit message (Collapse)Author
2021-02-01tpl/data: Add default user-agent header for getJSON requestsBaris Ceviz
2021-01-23tpl/os: remove 1mb limit for readFile.Aleksandr Demakin
2021-01-22tpl: Fix race condition in text template baseofCameron Moore
Copy most of the htmltemplate cloning to the textemplate implementation in the same function.
2021-01-08tpl: Fix metrics hint trackingCameron Moore
When tracking for cache hints, track the same template name as the call to MeasureSince in Execute. When referencing a partial "foo", the value of `n` does not match `templ.Name()` (`partials/foo` versus `partials/foo.html`). This was causing hints to go untracked since there was no existing metric to append the hint to. Fixes #8125
2021-01-08tpl: Do not return errors in substr for out-of-bounds casesCameron Moore
Most other substr implementations don't error out in out-of-bounds cases but simply return an empty string (or a value that's printed as an empty string). We'll follow their lead and not exit template execution. Allow the user decide what to do with the empty result. Fixes #8113
2021-01-08tpl: Add missing test scenario for strings.SubstrCameron Moore
2020-12-30Add Dart Sass supportBjørn Erik Pedersen
But note that the Dart Sass Embedded Protocol is still in beta (beta 5), a main release scheduled for Q1 2021. Fixes #7380 Fixes #8102
2020-12-19Improve LookPathBjørn Erik Pedersen
2020-12-16tpl: Regenerate templatesBjørn Erik Pedersen
2020-12-16tpl: Fix series detection in opengraphMaciej Sawicki
When inside front matter you specified series with spaces, then the opengraph template wouldn't detect other articles, because in `.Site.Taxonomies.series` they are stored by urlized key. Example: ```yaml # in front matter series: - My Series ``` ```gohtml {{/* in a template */}} {{- $series := index .Site.Taxonomies.series$name }} {{/* was resolved to */}} {{- $series := index {'my-series': ...} "MySeries" }} ```
2020-12-16all: Fix minor typosPhil Davis
2020-12-03tpl/internal/go_templates: Revert formattingBjørn Erik Pedersen
Should make future fork synch easier.
2020-12-03all: Format code with gofumptBjørn Erik Pedersen
See https://github.com/mvdan/gofumpt
2020-12-02tpl: Add title parameter to YouTube shortcodeAndrew Zenk
2020-12-02tpl: Fix substr when length parameter is zeroCameron Moore
When length parameter is zero, always return an empty string. Updates #7993
2020-11-28tpl: Refactor and fix substr logicCameron Moore
Fix miscalculations when start is negative. Results should now match PHP substr. Fixes #7993
2020-11-20deps: Update to Chroma v0.8.2Bjørn Erik Pedersen
Closes #7970
2020-11-06Updated year in headerAdamKorcz
2020-11-06Added first fuzzerAdamKorcz
2020-10-29tpl: Fix reflection bug in mergeCameron Moore
Value.Type().Key() must only be called on map values. Fixes #7899
2020-10-22Allow getJSON errors to be ignoredBjørn Erik Pedersen
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866
2020-10-21tpl: Refactor time.AsTime location implementationCameron Moore
2020-10-21tpl: Update Hugo time to support optional [LOCATION] parameterMark Johnson
2020-10-16embedded: Always show page number when 5 pages or lessCameron Moore
Fixes #7523
2020-10-03tpl: Add Do Not Track (dnt) option to Vimeo shortcodeJosh Gerdes
Added a Vimeo EnableDNT privacy option to the Hugo config. This will enable the Vimeo 'Do Not Track' flag when either Vimeo shortcode tempalte options are used. When enabled, it will force the Vimeo player to be blocked from tracking any session data, including all cookies and stats. Fixes #7700
2020-09-29langs/i18n: Upgrade to go-i18n v2Bjørn Erik Pedersen
Fixes #5242
2020-09-14tpl: Fix grammar in the new 'requires non-zero' error messageEvgeny Kuznetsov
2020-09-07Fix some change detection issues on server reloadsBjørn Erik Pedersen
* Fix change detection when .GetPage/site.GetPage is used from shortcode * Fix stale content for GetPage results with short name lookups on server reloads Fixes #7623 Fixes #7624 Fixes #7625
2020-08-28tpl: Add limit support to replaceRECameron Moore
Go stdlib doesn't contain a limited replace in the regexp package, but we can accomplish the same thing with ReplaceAllStringFunc. Fixes #7586
2020-08-28tpl: Extend merge to accept multiple parametersCameron Moore
Fixes #7595
2020-08-28tpl: Add limit option to replace template functionCameron Moore
Updates #7586
2020-08-19Fail on partials with return when given none or a zero argumentBjørn Erik Pedersen
We need to make a proper fix for this, but it is better with an error than just silently continue. Fixes #7572 Updates #7528
2020-08-12Remove trailing whitespace and tabs from RSS templatesKyle Anderson
The rss templates had some tab characters mixed in with the spaces. Additionally there would end up being trailing whitespace in output rss feeds, which looks red in git diff.
2020-08-06Revert "Fix ellipsis display logic in pagination template"Joe Mooring
This reverts commit 2fa851e6500752c0cea1da5cfdfc6d99e0a81a71.
2020-07-31Fix ellipsis display logic in pagination templateJoe Mooring
Closes #7523
2020-07-23Fix date format in internal schema templateJoe Mooring
Prior to this change, the offset indicator for dates with positive offsets was rendered as + instead of +. Fixes #7495
2020-07-22resources/js: Simplify options handlingBjørn Erik Pedersen
Mostly to minify cache hash breakage. Updates #7499
2020-07-13Fix baseof block regressionBjørn Erik Pedersen
From Hugo 0.74.0. Fixes #7478
2020-07-13docs: Regenerate docs helperBjørn Erik Pedersen
2020-07-13Add proper Media Type handling in js.BuildBjørn Erik Pedersen
See #732
2020-07-13Add js.Build asset bundlingRemko Tronçon
Fixes #7321
2020-07-06Add openapi3.UnmarshalBjørn Erik Pedersen
Fixes #7442 Fixes #7443
2020-07-04Fix server reload when non-HTML shortcode changesBjørn Erik Pedersen
Fixes #7448
2020-07-03tpl/strings: Add strings.CountBjørn Erik Pedersen
Fixes #7453
2020-07-02tpl: Add debug.DumpBjørn Erik Pedersen
Fixes #3957
2020-07-02Add support for inline partialsBjørn Erik Pedersen
Fixes #7444
2020-06-12Regenerate templatesBjørn Erik Pedersen
2020-06-12Beautify HTML generated by pagination templateJoe Mooring
Fixes #7199.
2020-06-05tpl/crypto: Add hmacEdouard
2020-06-02tpl: Fix bad rounding in NumFmtSam Smith
strconv.FormatFloat doesn't round properly sometimes, this adds a different method of rounding, fixes #7116