Add alternate HTML links to feeds
Some checks failed
CI / Test and lint (push) Failing after 10m38s

See https://github.com/feedbin/feedbin/issues/747
This commit is contained in:
Râu Cao 2025-04-27 11:57:44 +04:00
parent 9305e9f718
commit b7eccde9d0
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -20,6 +20,7 @@ export async function profileAtomFeed(
<id>${articleId}</id> <id>${articleId}</id>
<title>${article.title}</title> <title>${article.title}</title>
<link href="${article.url}" /> <link href="${article.url}" />
<link rel="alternate" type="text/html" href="${article.url}" />
<link rel="alternate" type="application/nostr+json" href="nostr:${article.naddr}" /> <link rel="alternate" type="application/nostr+json" href="nostr:${article.naddr}" />
<updated>${isoDate(article.updatedAt)}</updated> <updated>${isoDate(article.updatedAt)}</updated>
<published>${isoDate(article.publishedAt)}</published> <published>${isoDate(article.publishedAt)}</published>
@ -35,6 +36,7 @@ export async function profileAtomFeed(
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom">
<title>${profile.name} on Nostr (Articles)</title> <title>${profile.name} on Nostr (Articles)</title>
<link rel="alternate" type="text/html" href="${profile.profileUrl}" />
<link rel="alternate" type="application/nostr+json" href="nostr:${profile.npub}" /> <link rel="alternate" type="application/nostr+json" href="nostr:${profile.npub}" />
<id>${feedId}</id> <id>${feedId}</id>
<updated>${isoDate(lastUpdate)}</updated> <updated>${isoDate(lastUpdate)}</updated>