quotes

My favourite quotes. (gatsbyjs)
git clone http://git.hanabi.in/repos/quotes.git
Log | Files | Refs | README | LICENSE

commit dfaf373efe3e8300964f4c613120e156dc71313e
parent 5a11929c686c4227c2b8417d748db6e504e9dd57
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Wed, 11 Mar 2020 13:09:35 +0530

sort the tags

Diffstat:
Msrc/templates/allTagsTemplate.js | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/templates/allTagsTemplate.js b/src/templates/allTagsTemplate.js @@ -7,6 +7,9 @@ function AllTagsTemplate({ pageContext }) { const { postsByTag, tags } = pageContext; const count = Object.values(postsByTag).map(el => el.length); const [max, min] = [Math.max(...count), Math.min(...count)]; + tags.sort(function(str1, str2) { + return str1.toLowerCase().localeCompare(str2.toLowerCase()); + }); return ( <Layout heading="Tags" slug="tags"> <SEO title="Tags" />