feat: show external plugins on the website (#937)

* feat: show external plugins on the website

Read plugins/external.json during website data generation and include
external plugins alongside local ones in plugins.json. External plugins
are flagged with external:true and carry metadata (author, repository,
homepage, license, source).

On the website:
- Plugin cards show a '🔗 External' badge and author attribution
- The 'Repository' button links to the source path within the repo
- The modal shows metadata (author, repo, homepage, license) and a
  'View Repository' CTA instead of an items list
- External plugins are searchable and filterable by tags

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: address PR #937 security and UX review comments

- Add sanitizeUrl() function to validate URLs and prevent XSS via javascript:/data: schemes
- Add rel="noopener noreferrer" to all target="_blank" links to prevent reverse-tabnabbing
- Change external plugin path from external/<name> to plugins/<name> for proper deep-linking
- Track actual count of external plugins added (after filtering/deduplication) in build logs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Aaron Powell
2026-03-10 10:13:16 +11:00
committed by GitHub
parent b91369d1b5
commit 3efc4f3a5b
5 changed files with 312 additions and 8 deletions

View File

@@ -900,6 +900,71 @@ body:has(#main-content) {
color: var(--color-error);
}
/* External plugin badge */
.resource-tag-external {
background: var(--color-accent);
color: var(--color-bg);
font-weight: 500;
}
/* External plugin modal metadata */
.external-plugin-metadata {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 20px;
padding: 12px 16px;
background: var(--color-bg-tertiary);
border-radius: var(--border-radius);
border: 1px solid var(--color-border);
}
.external-plugin-meta-row {
display: flex;
align-items: baseline;
gap: 12px;
font-size: 13px;
line-height: 1.5;
}
.external-plugin-meta-label {
color: var(--color-text-muted);
font-weight: 500;
min-width: 80px;
flex-shrink: 0;
}
.external-plugin-meta-value {
color: var(--color-text);
word-break: break-all;
}
.external-plugin-meta-value a {
color: var(--color-accent);
text-decoration: none;
}
.external-plugin-meta-value a:hover {
text-decoration: underline;
}
.external-plugin-cta {
margin-bottom: 16px;
}
.external-plugin-repo-btn {
display: inline-flex;
align-items: center;
gap: 6px;
}
.external-plugin-note {
font-size: 13px;
color: var(--color-text-muted);
font-style: italic;
line-height: 1.5;
}
/* Page Layouts */
.page-header {
padding: 56px 0 40px;