Update _build.js to insert F-Droid badges
This commit is contained in:
parent
2a4f77413d
commit
cb9cb8de24
@ -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__();
|
Loading…
x
Reference in New Issue
Block a user