From 37d427dec1576bcce6d331e9d3e7f7e7ba308618 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Mon, 21 Sep 2020 18:50:47 -0500 Subject: [PATCH] Add app status property --- helpers/build-app-list.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/helpers/build-app-list.js b/helpers/build-app-list.js index 12a4a5f..1beadd1 100644 --- a/helpers/build-app-list.js +++ b/helpers/build-app-list.js @@ -6,6 +6,14 @@ import slugify from 'slugify' const md = new MarkdownIt() + +const statuses = { + '✅': 'yes', + '✳️': 'yes-but', + '⏹': 'in-progress', + '🚫': 'no' +} + const getTokenLinks = function ( childTokens ) { const tokenList = [] @@ -98,8 +106,19 @@ export default async function () { lower: true }) + let status = 'unknown' + + for (const statusKey in statuses) { + if (text.includes(statusKey)) { + status = statuses[statusKey] + break + } + } + + appList.push({ name, + status, url, text, slug: appSlug,