From cb9cb8de249ed559f5c639e44bb408cccfa491dd Mon Sep 17 00:00:00 2001 From: tycrek Date: Mon, 25 May 2020 12:58:30 -0600 Subject: [PATCH] Update _build.js to insert F-Droid badges --- _build.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_build.js b/_build.js index 3b2ec0f..4944183 100644 --- a/_build.js +++ b/_build.js @@ -111,6 +111,9 @@ function generateServiceSection(data) { let name = `[${item.name}](${item.url})`; let eyes = item.eyes ? `**${item.eyes}-eyes**` : ''; let text = item.text.trim(); + + // Append the F-Droid badge to the name + if (item.fdroid) name = name.concat(' ' + fdroidLink(item.fdroid)) // Build the row let tableItem = `| ${name} | ${eyes} | ${text} |`; @@ -123,4 +126,9 @@ function generateServiceSection(data) { return serviceSection + notes; } +function fdroidLink(appId) { + //return `![F-Droid](https://img.shields.io/f-droid/v/${appId})` + return `[![F-Droid](https://img.shields.io/f-droid/v/${appId})](https://f-droid.org/en/packages/${appId}/)`; +} + __main__(); \ No newline at end of file