Merge pull request #351 from StephenBrown2/open-source-repo-key
This commit is contained in:
commit
8b27d1e774
18
_build.js
18
_build.js
@ -118,7 +118,10 @@ function generateServiceSection(data) {
|
||||
let text = item.text.trim();
|
||||
|
||||
// Append the F-Droid badge to the name
|
||||
if (item.fdroid) name = name.concat(' ' + fdroidLink(item.fdroid));
|
||||
if (item.fdroid) name = name.concat('<br/>', fdroidLink(item.fdroid));
|
||||
|
||||
// Append the Repo badge to the name
|
||||
if (item.repo) name = name.concat('<br/>', repoLink(item.repo));
|
||||
|
||||
// Build the row
|
||||
let tableItem = `| ${name} | ${eyes} | ${text} |`;
|
||||
@ -136,7 +139,18 @@ function generateServiceSection(data) {
|
||||
* @param {String} appId The package identifier on F-Droid
|
||||
*/
|
||||
function fdroidLink(appId) {
|
||||
return `[](https://f-droid.org/en/packages/${appId}/)`;
|
||||
return `[](https://f-droid.org/en/packages/${appId}/)`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a badge acting as a link to a source repository for an app.
|
||||
* @param {String} repo The repository url
|
||||
*/
|
||||
function repoLink(repo) {
|
||||
let repoURL = new URL(repo);
|
||||
let repoHost = path.basename(repoURL.hostname, path.extname(repoURL.hostname))
|
||||
if (repoHost.includes(".")) repoHost = path.extname(repoHost).replace(".", "")
|
||||
return `[](${repo})`
|
||||
}
|
||||
|
||||
/**
|
||||
|
1463
yaml/degoogle.yml
1463
yaml/degoogle.yml
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user