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
2017-09-29Clean up lint in various packagesCameron Moore
Changes fall into one of the following: - gofmt -s - receiver name is inconsistent - omit unused 2nd value from range - godoc comment formed incorrectly - err assigned and not used - if block ends with a return statement followed by else
2017-09-28tpl: Add os.fileExists template functiondigitalcraftsman
Fixes #3839
2017-09-28tpl: Add float template functionLucas Jenss
Add a template function that allows conversion to float. This is useful, for example, when passing aspect ratios into templates, which tend to not be integers. Fixes #3307
2017-09-26tpl: Set Metrics at creation timeBjørn Erik Pedersen
2017-09-26metrics: Add simple template metrics featureCameron Moore
2017-09-26tpl: Add math.Ceil, Floor, and Round to method mappingsCameron Moore
2017-09-25Use Chroma as new default syntax highlighterBjørn Erik Pedersen
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config. Fixes #3888
2017-09-24tpl: Add urls.Parse functionCameron Moore
Add a urls.Parse template function that front-ends url.Parse from the Go stdlib. Fixes #3849
2017-09-24tpl: Add math.Ceil, Floor, and RoundCameron Moore
Ceil and Floor are frontends for the stdlib math functions. The Round implementation is essentially the same thing except that the Go stdlib doesn't include a Round implementation in a stable release yet. I've included the Round function slated for Go 1.10. Fixes #3883
2017-09-23Trim newlines in the hightlight shortcodeBjørn Erik Pedersen
Fixes #3898
2017-09-23Fix the docs helper toolBjørn Erik Pedersen
2017-09-13tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)Bjørn Erik Pedersen
Fixes #3876
2017-09-09tpl/time: Add time.Duration and time.ParseDuration template funcsBjørn Erik Pedersen
And with time.Duration with the convenient alias `duration`: ``` {{ mul 60 60 | duration "second" }} ``` Fixes #3828
2017-09-08tpl/compare: Add cond (ternary) template funcBjørn Erik Pedersen
Fixes #3860
2017-09-06hugolib: Implement "related content"Bjørn Erik Pedersen
This closes #98, even if this commit does not do full content text search. We may revisit that problem in the future, but that deserves its own issue. Fixes #98
2017-08-22Update template_embedded.gooneleaftea
Changed disqus urls from http to https. This fixes mixed content warnings on browsers when viewing Hugo websites over SSL (https).
2017-08-19tpl: Prepare for template metricsBjørn Erik Pedersen
2017-08-18tpl: Cleanup strings.TrimPrefix and TrimSuffixCameron Moore
These funcs were added during the move to namespaces but were undocumented. This commit fixes the order of the arguments and adds the funcs to the method mapping.
2017-08-18tpl: Add strings.TrimLeft and TrimRight Cameron Moore
2017-08-18compare, hugolib, tpl: Add Eqer interfaceBjørn Erik Pedersen
And use it in `eq` and `ne` so `Page` values can be compared directly in the templates without thinking about it being a `Page` or a `PageOutput` wrapper. Fixes #3807
2017-08-12Add an iFrame title to the YouTube shortcodeNic Raboy
To accommodate modern web accessibility as outlined here https://dequeuniversity.com/tips/provide-iframe-titles
2017-08-10tpl/transform: Only strip p tag in markdownify if only one paragraphBjørn Erik Pedersen
Fixes #3040
2017-08-07all: Fix spellingBjørn Erik Pedersen
And some other minor issues.
2017-08-07all: gofmt -sBjørn Erik Pedersen
2017-08-03Add some missing doc commentsJorin Vogel
As pointed out by the linter, some exported functions and types are missing doc comments. The linter warnings have been reduced from 194 to 116. Not all missing comments have been added in this commit though.
2017-08-01Switch from fork bep/inflect to markbates/inflectJorin Vogel
Original package has received updates the fork hasn't. Without fork updates are easier to maintain.
2017-07-31Make the title case style guide configurableBjørn Erik Pedersen
This works for the `title` func and the other places where Hugo makes title case. * AP style (new default) * Chicago style * Go style (what we have today) Fixes #989
2017-07-28tpl: Accommodate gccgo in TestMethodToNameAnthony Fok
Fixes #3744
2017-07-28tpl/collections: Fix intersect on []interface{} handlingCameron Moore
Fixes #3718
2017-07-21tpl: Use hash for cache keyJake Howard
Use a hash for the cache key, to fix 'file name too long' errors when retreiving from long urls Fixes #3690
2017-07-18Improve the twitter card templateBjørn Erik Pedersen
Now fall back to `images` set in site config for twitter card. Fixes #3711
2017-07-08tpl/collections: Add some empty slice tests to intersectBjørn Erik Pedersen
See #3686
2017-07-08tpl/collections: Fix union when the first slice is emptyBjørn Erik Pedersen
Fixes #3686
2017-07-03tpl/collections: Add Pages support to Intersect and UnionBjørn Erik Pedersen
This enables `AND` (`intersect`) and `OR` (`union`) filters when combined with `where`. Example: ```go {{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }} {{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }} {{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }} ``` The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params. Fixes #3174
2017-07-03tpl/collections: Fix In function for JSON arraysBjørn Erik Pedersen
Fixes #1468
2017-07-03tpl/math: Add log functionArtem Sidorenko
It might be very useful for building tag clouds.
2017-06-28tpl: Add WebP images supportBjørn Erik Pedersen
Fixes #3529
2017-06-28tpl: Only show post's own keywords in schema.orgBruno Amaral
Fixes #2635 Closes #2646
2017-06-27tpl: Simplify the Disqus template a little bit (#3655)Yihui Xie
In accordance to the official guide: https://disqus.com/admin/universal/
2017-06-27tpl: Improve the built-in Disqus template (#3639)Yihui Xie
* Improve the built-in Disqus template Set `disqus_identifier`, `disqus_title`, and `disqus_url` only if the user has explicitly provided them. Do not load Disqus when the website is previewed locally, otherwise it is very confusing. * Use disqus_config instead of three global variables https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
2017-06-13Run gofmt to get imports in line vs gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update textual references in Go source to point to gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-06-08tpl/collections: Add uint support to InCameron Moore
2017-06-08tpl/collections: Support interfaces in unionCameron Moore
Fixes #3411
2017-06-03tpl: Add uniq functionNathan Sharfi
2017-05-22tpl/cast: Handle template.HTML and friends in ToIntCameron Moore
Also add tests for ToInt and ToString. Resolves #3308
2017-05-20tpl/time: Re-add the time exampleBjørn Erik Pedersen
2017-05-20tpl: Make the Namespace func signature explicitBjørn Erik Pedersen
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
2017-05-20tpl/time: Remove asTime template func mappingCameron Moore