quotes

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

commit 65739e98da99d985e11820da6fbc8676767d5848
parent dfaf373efe3e8300964f4c613120e156dc71313e
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Wed, 11 Mar 2020 13:10:32 +0530

sort authors

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

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