summaryrefslogtreecommitdiffstats
path: root/tpl
AgeCommit message (Collapse)Author
2023-10-21tpl/debug: Add average and median to timer outputBjørn Erik Pedersen
2023-10-20tpl/debug: Add debug.TimerBjørn Erik Pedersen
Closes #11580
2023-10-18hugolib: Deprecate .Site.DisqusShortnameJoe Mooring
Use .Site.Config.Services.Disqus.Shortname instead.
2023-10-18tpl/tplimpl: Fix dropped errorLars Lehtonen
2023-10-17hugolib: Deprecate .Site.GoogleAnalyticsJoe Mooring
Use .Site.Config.Services.GoogleAnalytics.ID instead.
2023-10-17tpl/tplimpl: Deprecate .Site.Author usage in RSS templateJoe Mooring
2023-10-17tpl/tplimpl: Deprecate .Site.Social usage with internal templatesJoe Mooring
2023-10-05all: Format files with gofmtOleksandr Redko
2023-09-27tpl/lang: Formally deprecate lang.NumFmtJoe Mooring
Use lang.FormatNumberCustom instead.
2023-09-27tpl/collections: Fix and deprecate echoParamsJoe Mooring
Fixes #11498
2023-09-23google_analytics_async.html: Add deprecation warningCarl Johnson
2023-09-21Upgrade to Go 1.21.1Bjørn Erik Pedersen
See https://github.com/golang/go/issues?q=milestone%3AGo1.21.1+label%3ACherryPickApproved Fixes #11474 Fixes #11414
2023-08-23Go 1.21 UpgradeBjørn Erik Pedersen
Fixes #11351
2023-08-03Add Page.RenderShortcodesBjørn Erik Pedersen
A layouts/shortcodes/include.html shortcode may look like this: ```html {{ $p := site.GetPage (.Get 0) }} {{ $p.RenderShortcodes }} ``` Fixes #7297
2023-07-28tpl/collections: Add BenchmarkWhereOpsBjørn Erik Pedersen
``` BenchmarkWhereOps/eq-10 8702 120410 ns/op 52280 B/op 2515 allocs/op BenchmarkWhereOps/ne-10 9829 120759 ns/op 52280 B/op 2515 allocs/op BenchmarkWhereOps/like-10 6754 176377 ns/op 52917 B/op 2515 allocs/op ```
2023-07-28tpl/collections: Add like operator to where functionJoe Mooring
Closes #11279
2023-07-28tpl/collections: Fix description of apply functionJoe Mooring
The collections.Apply template function cannot be used with maps.
2023-07-27Add a common regexp cacheBjørn Erik Pedersen
``` BenchmarkGetOrCompileRegexp-10 73959368 13.71 ns/op 0 B/op 0 allocs/op BenchmarkCompileRegexp-10 3143529 380.1 ns/op 872 B/op 10 allocs/op ```
2023-07-11tpl/collections: Fix WordCount (etc.) regression in Where, Sort, DelimitBjørn Erik Pedersen
Fixes #11234
2023-07-08Make imageConfig work with modulesBjørn Erik Pedersen
Fixes #11205
2023-06-28Fix output formats and media type per language config regressionBjørn Erik Pedersen
Fixes #11159
2023-06-28common/collections: Fix append regression to allow appending nilkhayyam
Closes #11180
2023-06-26tpl/tplimpl: Fix typo in global variable nameOleksandr Redko
2023-06-18Replace the old log setup, with structured logging etc.Bjørn Erik Pedersen
Fixes #11124
2023-06-15Fix upstream Go templates bug with reversed key/value assignmentBjørn Erik Pedersen
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. This also includes a security fix that now disallows Go template actions in JS literals (inside backticks). This will throw an error saying "... appears in a JS template literal". If you're really sure this isn't a security risk in your case, you can revert to the old behaviour: ```toml [security] [security.gotemplates] allowActionJSTmpl = true ``` See https://github.com/golang/go/issues/59234 Fixes #11112
2023-06-14tpl/collections: Fix append when appending a slice to a slice of slicesBjørn Erik Pedersen
Fixes #11093
2023-06-13tpl/math: Allow variadic math functions to take slice args, add ↵Bjørn Erik Pedersen
math.Product, math.Sum * Update math.Min and math.Max to allow 1 or more args, either scalar or slice, or combination of the two * Add math.Sum (allow 1 or more args, either scalar or slice, or combination of the two) * Add math.Product (allow 1 or more args, either scalar or slice, or combination of the two) Fixes #11030
2023-06-01markup: Fix typo in function and struct namesOleksandr Redko
2023-06-01all: Replace deprecated ioutil with io and osOleksandr Redko
2023-05-30tpl/tplimpl: Use .Language.LanguageCode in built-in templatesJoe Mooring
2023-05-29Fix potential deadlock in ByParamBjørn Erik Pedersen
Fixes #11039
2023-05-22docs: Regen docshelperBjørn Erik Pedersen
2023-05-21tpl/tplimpl: Add img loading attribute to figure shortcode (#10927)InLaw
2023-05-20Add hugo.WorkingDirBjørn Erik Pedersen
Fixes #10969
2023-05-20tpl/urls: Return empty string when JoinPath has zero argsJoe Mooring
2023-05-19tpl/urls: Fix build broken by a mergeBjørn Erik Pedersen
2023-05-19tpl/urls: Add JoinPath template functionJoe Mooring
See https://pkg.go.dev/net/url#JoinPath Closes #9694
2023-05-18all: Fix comments for exported functions and packagesOleksandr Redko
2023-05-17tpl/lang: document delimiter option for FormatNumberCustomJoe Mooring
Closes gohugoio/hugoDocs#1760
2023-05-16tpl: Add math.AbsOleksandr Redko
Fixes #10941.
2023-05-16Create a struct with all of Hugo's config optionsBjørn Erik Pedersen
Primary motivation is documentation, but it will also hopefully simplify the code. Also, * Lower case the default output format names; this is in line with the custom ones (map keys) and how it's treated all the places. This avoids doing `stringds.EqualFold` everywhere. Closes #10896 Closes #10620
2023-04-27tpl/strings: Clarify findRESubmatch descriptionJoe Mooring
2023-04-20tpl/debug: Add VisualizeSpacesBjørn Erik Pedersen
2023-03-20resources.functions: improve validationAndreas Deininger
2023-03-14tpl/math: Return error if less than 2 input numberssepts
Fixes #10827
2023-03-12Run gofmt -s on source filesAndreas Deininger
2023-03-11tpl/math: Allow multi numbers in add, sub, mul, div, min and maxsepts
2023-03-08tpl: Add hasSuffix aliasJonathan Fisher
strings.HasPrefix already has an alias of hasPrefix but strings.HasSuffix has no such alias. This PR adds a hasSuffix alias to the tpl function with corresponding function documentation. It also adds a Minor update to the hasPrefix function documentation re: keywords and relatedfuncs. Completes https://github.com/gohugoio/hugo/issues/10474
2023-03-05Allow page.TableOfContents on self in shortcodeBjørn Erik Pedersen
Fixes #10791
2023-03-04tpl/partial: Consolidate GoDocBjørn Erik Pedersen