summaryrefslogtreecommitdiffstats
path: root/tpl
AgeCommit message (Collapse)Author
2021-03-28Try to fix the fuzz buildBjørn Erik Pedersen
2021-03-14media: Make Type comparableBjørn Erik Pedersen
So we can use it and output.Format as map key etc. This commit also fixes the media.Type implementation so it does not need to mutate itself to handle different suffixes for the same MIME type, e.g. jpg vs. jpeg. This means that there are no Suffix or FullSuffix on media.Type anymore. Fixes #8317 Fixes #8324
2021-03-03Add support for Google Analytics v4Daniel Atwood
2021-02-23tpl: Add method mappings for strings.Contains, strings.ContainsAnyBjørn Erik Pedersen
Just to confirm/document the function signature.
2021-02-18tpl: Make the build green againBjørn Erik Pedersen
2021-02-18tpl: Regenerate internal templatesBjørn Erik Pedersen
2021-02-18tpl: Update date logic of opengraph and schema internal templatesDaniel Atwood
* Fix: updated date logic in opengraph template * Updated date logic in schema template * Reformatted opengraph and schema * Wrapped PublishDate and Lastmod in with
2021-02-18tpl: Add temporary patch to fix template data raceBjørn Erik Pedersen
Keep this as a separate commit so we can reapply it if needed. Fixes #7293
2021-02-18Add breaking tests for "map read and map write in templates"Bjørn Erik Pedersen
The fix upstream in Go was reverted, so we apply a temporary patch for this in Hugo. Updates #7293
2021-02-18Pull in latest Go template sourceBjørn Erik Pedersen
2021-02-18tpl/internal: Synch Go templates fork with Go 1.16devBjørn Erik Pedersen
2021-02-14Fix some humanize issuessusiwen8
Fixes #7912
2021-02-06tpl/embedded: Exclude pages without Permalink from sitemapJeremy Epstein
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-01tpl: 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-02tpl: 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