nandi/gleanpublic Fork 0
823d9d8
Commits
Clone
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

fix(web): render feed title or url as link fallbacks

Closes #14

For feeds that serve items without titles, falls back to feed title as
the text to render items into. To be extra safe, adds a second fallback
for when a feed doesn't serve a feed title either, falling back to feed
url.

I unfortunately don't currently have a way to test this locally, sorry
if it doesn't work. Feel completely free to close this.
Matyáš Volf committed 2026-07-17T20:18:54+02:00 Browse files
823d9d8 parent: bb3cbba
modified web/src/lib/components/ArticleCard.svelte +4 -1
@@ -61,6 +61,9 @@
6161 .filter(Boolean)
6262 .join(" / "),
6363 );
64+ const articleTitle = $derived(
65+ article.title || article.feed_title || article.feed_url,
66+ );
6467
6568 function fmt(t: string): string {
6669 const d = new Date(t);
@@ -89,7 +92,7 @@
8992 class="{expanded
9093 ? 'text-lg'
9194 : 'text-base'} font-bold leading-snug"
92- >{article.title}</span
95+ >{articleTitle}</span
9396 >
9497 </a>
9598 <div
@@ -61,6 +61,9 @@
61 .filter(Boolean)61 .filter(Boolean)
62 .join(" / "),62 .join(" / "),
63 );63 );
64+ const articleTitle = $derived(
65+ article.title || article.feed_title || article.feed_url,
66+ );
64 67
65 function fmt(t: string): string {68 function fmt(t: string): string {
66 const d = new Date(t);69 const d = new Date(t);
@@ -89,7 +92,7 @@
89 class="{expanded92 class="{expanded
90 ? 'text-lg'93 ? 'text-lg'
91 : 'text-base'} font-bold leading-snug"94 : 'text-base'} font-bold leading-snug"
92- >{article.title}</span95+ >{articleTitle}</span
93 >96 >
94 </a>97 </a>
95 <div98 <div