(plugin: RenderablePlugin)
| 48 | } |
| 49 | |
| 50 | function getExternalPluginUrl(plugin: RenderablePlugin): string { |
| 51 | if (plugin.source?.source === 'github' && plugin.source.repo) { |
| 52 | const base = `https://github.com/${plugin.source.repo}`; |
| 53 | return plugin.source.path && plugin.source.path !== '/' ? `${base}/tree/main/${plugin.source.path}` : base; |
| 54 | } |
| 55 | |
| 56 | return sanitizeUrl(plugin.repository || plugin.homepage); |
| 57 | } |
| 58 | |
| 59 | export function renderPluginsHtml(items: RenderablePlugin[]): string { |
| 60 | if (items.length === 0) { |
no test coverage detected