hugo/hugolib
Anton Harniakou 26f75edb7a Support numeric sort in ByParam
With this commit ByParam takes into account a type of a value under a
key. If both values are numeric then they're coerced into float64 and
then get compared.
If any value isn't numeric, for example it's nil or string, then both
values coerced into string and get compared as strings
(lexicographicaly)

Nil values are always sent to the end.

Numeric values confirm to any type listed below:
uint8, uint16, uint32, uint64, int, int8, int16, int32, int64, float32, float64

Closes #5305
2019-01-20 13:05:20 +00:00
..
filesystems Handle themes in the new file cache (for images, assets) 2018-11-23 21:09:00 +01:00
pagemeta
paths Make hugo server -t work again 2019-01-13 20:13:59 +00:00
testdata
testsite
404_test.go
alias.go Make WARN the new default log log level 2018-11-03 12:06:23 +01:00
alias_test.go
author.go
case_insensitive_test.go Fix Params case handling in the new site global 2019-01-20 12:42:24 +00:00
collections.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
collections_test.go
config.go Remove historical rssURI config 2019-01-10 18:24:38 +01:00
config_test.go Add /config dir support 2018-12-11 13:08:36 +01:00
configdir_test.go Add /config dir support 2018-12-11 13:08:36 +01:00
datafiles_test.go
disableKinds_test.go
embedded_shortcodes_test.go
embedded_templates_test.go
fileInfo.go
gitinfo.go
hugo_sites.go hugolib: Restore 0.48 slash handling in taxonomies 2018-12-30 18:50:09 +01:00
hugo_sites_build.go Add /config dir support 2018-12-11 13:08:36 +01:00
hugo_sites_build_errors_test.go Add file (line/col) info to ref/relref errors 2018-11-01 21:06:35 +01:00
hugo_sites_build_test.go Remove historical rssURI config 2019-01-10 18:24:38 +01:00
hugo_sites_multihost_test.go
hugo_themes_test.go
language_content_dir_test.go
media.go
menu.go
menu_test.go
minify_publisher_test.go
multilingual.go
orderedMap.go
orderedMap_test.go
page.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
page_content.go Add CSV support to transform.Unmarshal 2018-12-23 16:33:21 +01:00
page_errors.go
page_output.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
page_paths.go Revert " Fix handling of taxonomy terms containing slashes" 2018-12-30 18:50:09 +01:00
page_paths_test.go Revert " Fix handling of taxonomy terms containing slashes" 2018-12-30 18:50:09 +01:00
page_permalink_test.go hugolib: Improve logic of output path trimming 2018-12-21 09:42:37 +01:00
page_ref.go Remove duplicate mapstructure depdendency 2018-11-28 00:17:43 +01:00
page_resource.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
page_taxonomy_test.go Revert " Fix handling of taxonomy terms containing slashes" 2018-12-30 18:50:09 +01:00
page_test.go Move the emoji parsing to pageparser 2018-12-20 20:08:01 +01:00
page_time_integration_test.go
page_without_content.go
pagebundler.go
pagebundler_capture.go Make WARN the new default log log level 2018-11-03 12:06:23 +01:00
pagebundler_capture_test.go
pagebundler_handlers.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
pagebundler_test.go Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
pageCache.go
pageCache_test.go
pagecollections.go
pagecollections_test.go
pageGroup.go
pageGroup_test.go
pages_language_merge.go
pages_language_merge_test.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
pages_related.go
pages_related_test.go
pageSort.go Support numeric sort in ByParam 2019-01-20 13:05:20 +00:00
pageSort_test.go Support numeric sort in ByParam 2019-01-20 13:05:20 +00:00
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go Fix Permalink for resource, baseURL with path and canonifyURLs set 2018-11-15 16:37:11 +01:00
pagination_test.go
path_separators_test.go
permalinker.go
permalinks.go hugolib: Restore 0.48 slash handling in taxonomies 2018-12-30 18:50:09 +01:00
permalinks_test.go hugolib: Restore 0.48 slash handling in taxonomies 2018-12-30 18:50:09 +01:00
prune_resources.go cache/filecache: Add a cache prune func 2018-11-14 23:14:51 +01:00
resource_chain_test.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
robotstxt_test.go
rss_test.go
shortcode.go hugolib: Add .Name as a shortcode variable 2018-12-21 09:51:15 +01:00
shortcode_test.go hugolib: Add .Name as a shortcode variable 2018-12-21 09:51:15 +01:00
site.go resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
site_benchmark_test.go hugolib: Enable Emoji in site benchmark 2018-12-20 17:24:51 +01:00
site_output.go
site_output_test.go
site_render.go hugolib: Remove "double layout" lookup 2018-12-17 11:34:32 +01:00
site_sections.go hugolib: Improve nil handling in IsDescendant and IsAncestor 2018-11-28 12:36:59 +01:00
site_sections_test.go hugolib: Improve nil handling in IsDescendant and IsAncestor 2018-11-28 12:36:59 +01:00
site_stats_test.go
site_test.go Remove historical rssURI config 2019-01-10 18:24:38 +01:00
site_url_test.go
siteJSONEncode_test.go
sitemap.go
sitemap_test.go
taxonomy.go
taxonomy_test.go hugolib: Restore 0.48 slash handling in taxonomies 2018-12-30 18:50:09 +01:00
template_engines_test.go
template_test.go hugolib: Add .Site.Sites 2018-12-06 14:37:25 +01:00
testhelpers_test.go hugolib: Restore 0.48 slash handling in taxonomies 2018-12-30 18:50:09 +01:00
translations.go