hugo/hugolib
Cameron Moore de7c32a1a8 tpl: Add template function namespaces
This commit moves almost all of the template functions into separate
packages under tpl/ and adds a namespace framework.  All changes should
be backward compatible for end users, as all existing function names in
the template funcMap are left intact.

Seq and DoArithmatic have been moved out of the helpers package and into
template namespaces.

Most of the tests involved have been refactored, and many new tests have
been written.  There's still work to do, but this is a big improvement.

I got a little overzealous and added some new functions along the way:

- strings.Contains
- strings.ContainsAny
- strings.HasSuffix
- strings.TrimPrefix
- strings.TrimSuffix

Documentation is forthcoming.

Fixes #3042
2017-04-30 10:56:38 +02:00
..
testdata
404_test.go hugolib: Add 404 test 2017-03-27 15:43:56 +02:00
alias.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
alias_test.go hugolib, output: Handle aliases for all HTML formats 2017-03-27 15:43:56 +02:00
author.go
case_insensitive_test.go
config.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
config_test.go
datafiles_test.go hugolib: Log WARNING only on unknown /data files 2017-04-18 18:47:37 +02:00
disableKinds_test.go
embedded_shortcodes_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
gitinfo.go hugolib: Make missing GitInfo a WARNING 2017-04-26 11:03:12 +02:00
handler_base.go
handler_file.go hugolib: Remove siteWriter 2017-03-27 15:43:56 +02:00
handler_meta.go
handler_page.go
handler_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
hugo_info.go Automate the Hugo release process 2017-04-24 11:08:56 +02:00
hugo_sites.go all: Handle all errors 2017-04-06 20:35:26 +02:00
hugo_sites_build.go hugolib: Update site stats to take output formats into account 2017-03-27 15:43:56 +02:00
hugo_sites_build_test.go hugolib, i18n: Update tests with flat format and TOML files 2017-04-02 18:43:32 +02:00
media.go
menu.go
menu_old_test.go hugolib: More TODO fixes 2017-03-27 15:43:56 +02:00
menu_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
multilingual.go
node_as_page_test.go hugolib: Refactor/-work the permalink/target path logic 2017-03-27 15:43:56 +02:00
page.go hugolib: Prevent decoding pageParam in common cases 2017-04-22 22:40:20 +02:00
page_collections.go
page_output.go hugolib: Must recreate Paginator on live-reload 2017-04-12 21:15:51 +02:00
page_paths.go hugolib: Avoid index.md in /index/index.html 2017-04-27 09:50:13 +02:00
page_paths_test.go hubolib: Narrow a test assertion 2017-04-27 13:00:24 +02:00
page_permalink_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
page_taxonomy_test.go
page_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
page_time_integration_test.go
pageCache.go
pageCache_test.go
pageGroup.go
pageGroup_test.go
pageSort.go
pageSort_test.go
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go hugolib: Refactor/-work the permalink/target path logic 2017-03-27 15:43:56 +02:00
pagination_test.go output: Rename HTMLType etc. to HTMLFormat 2017-03-27 15:43:56 +02:00
path_separators_test.go
permalinker.go hugolib: Add optional outputFormat to Ref/RelRef 2017-04-04 23:09:01 +02:00
permalinks.go
permalinks_test.go
robotstxt_test.go
rss_test.go
scratch.go tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
scratch_test.go
shortcode.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
shortcode_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
shortcodeparser.go
shortcodeparser_test.go
site.go hugolib: Fix handling of zero-length files 2017-04-23 22:46:01 +02:00
site_output.go hugolib: Final fix of rssURI deprecation 2017-04-10 21:26:55 +02:00
site_output_test.go hugolib, output: Do not lower case template names 2017-04-12 21:40:55 +02:00
site_render.go Render 404 in default language only 2017-04-30 10:40:37 +02:00
site_test.go hugolib: Avoid index.md in /index/index.html 2017-04-27 09:50:13 +02:00
site_url_test.go hubolib: Do not add missing trailing slash to command line baseURL 2017-04-07 20:18:31 +02:00
siteJSONEncode_test.go
sitemap.go
sitemap_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
taxonomy.go
taxonomy_test.go hugolib: Refactor/-work the permalink/target path logic 2017-03-27 15:43:56 +02:00
template_engines_test.go
template_test.go
testhelpers_test.go hugolib: Fix handling of zero-length files 2017-04-23 22:46:01 +02:00
translations.go