From fd065934a6a038fda55c449ddf564c012076ae3d Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 23 Mar 2025 18:54:35 +0800 Subject: [PATCH] fix(wordpress): favicon --- lib/routes/wordpress/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/wordpress/util.ts b/lib/routes/wordpress/util.ts index b0e712961..c57cfffa2 100644 --- a/lib/routes/wordpress/util.ts +++ b/lib/routes/wordpress/util.ts @@ -194,7 +194,7 @@ const fetchData = async (url: string, rootUrl: string): Promise => { const $ = load(response); const title = $('title').first().text(); - const image = new URL('wp-content/uploads/site_logo.png', rootUrl).href; + const image = new URL($('link[rel="icon"]').last().attr('href') ?? 'wp-content/uploads/site_logo.png', rootUrl).href; return { title,