You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Plugin Repo: Added plugin download links on README page
This commit is contained in:
@@ -2,20 +2,36 @@ import * as fs from 'fs-extra';
|
||||
import markdownUtils, { MarkdownTableHeader, MarkdownTableRow } from '@joplin/lib/markdownUtils';
|
||||
|
||||
export default async function(readmePath: string, manifests: any) {
|
||||
const rows: MarkdownTableRow[] = [];
|
||||
let rows: MarkdownTableRow[] = [];
|
||||
|
||||
for (const pluginId in manifests) {
|
||||
rows.push(manifests[pluginId]);
|
||||
}
|
||||
|
||||
rows = rows.map(row => {
|
||||
return {
|
||||
...row,
|
||||
download_url: `https://github.com/joplin/plugins/raw/master/plugins/${row.id}/plugin.jpl`,
|
||||
};
|
||||
});
|
||||
|
||||
const headers: MarkdownTableHeader[] = [
|
||||
{
|
||||
name: 'homepage_url',
|
||||
label: ' ',
|
||||
filter: (value: string) => {
|
||||
if (!value) return '-';
|
||||
return `[🏠](${markdownUtils.escapeLinkUrl(value)})`;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'download_url',
|
||||
label: ' ',
|
||||
filter: (value: string) => {
|
||||
if (!value) return '-';
|
||||
return `[⬇️](${markdownUtils.escapeLinkUrl(value)})`;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
|
||||
Reference in New Issue
Block a user