From e778450963fb5573377d26e1490dc43bd24fa0b7 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Wed, 26 Jul 2023 13:33:05 -0400 Subject: [PATCH] fix: show post.url if the post does not have a thumbnail (#23) Right now, if a post does not have a post.thumbnail_url and is just a link to another website, the link is not displayed... so the user cannot go to the actual article. This copies the link code from the Post object and provides a link if there is a post.url but not a post.thumbnail_url. --- src/routes/post/[instance]/[id]/+page.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/routes/post/[instance]/[id]/+page.svelte b/src/routes/post/[instance]/[id]/+page.svelte index 8fcd4762..c91c4c8a 100644 --- a/src/routes/post/[instance]/[id]/+page.svelte +++ b/src/routes/post/[instance]/[id]/+page.svelte @@ -92,7 +92,14 @@ saved={postData.saved} />

{post.name}

- {#if isImage(post.url)} + {#if post.url && !post.thumbnail_url} + + {post.url} + + {:else if isImage(post.url)}