diff options
Diffstat (limited to 'layouts/shortcodes/links.html')
-rw-r--r-- | layouts/shortcodes/links.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/shortcodes/links.html b/layouts/shortcodes/links.html index 5acde5d..6d40dae 100644 --- a/layouts/shortcodes/links.html +++ b/layouts/shortcodes/links.html @@ -4,9 +4,14 @@ {{ with . | transform.Unmarshal }} <table class="links"> - {{ range (sort .links "Title") }} + {{ range (sort .links "Title" "asc") }} {{ $letter := slicestr .Title 0 1 }} + {{ $letter = strings.ToUpper $letter }} + {{ if findRE `\d` $letter }} + {{ $letter = "0-9" }} + {{ end}} {{ if not (eq $letter $lastLetter) }} + <tr> <td colspan="2"> <hr> |