Skip to content

Commit 83f33d8

Browse files
committed
Fix RSS callout and feed icons
1 parent 1cf93cb commit 83f33d8

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

public/favicon.ico

21.9 KB
Binary file not shown.

public/icon-32.png

1.88 KB
Loading

src/components/HeadCommon.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ const { icon } = SITE;
1313
<link rel='dns-prefetch' href='https://giscus.app' />
1414
<link rel='preconnect' href='https://giscus.app' crossorigin />
1515

16-
<link rel='icon' href={icon} />
16+
<link rel='icon' href='/favicon.ico' />
17+
<link rel='icon' type='image/png' sizes='32x32' href='/icon-32.png' />
18+
<link rel='icon' type='image/png' sizes='144x144' href={icon} />
19+
<link rel='apple-touch-icon' sizes='144x144' href={icon} />
1720
<link rel='sitemap' href='/sitemap.xml' />
1821
<!-- Canonical URL is handled in HeadSEO.astro (included via BaseLayout) -->
1922

src/components/HeadSEO.astro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ const { content = {}, pageURL } = Astro.props;
99
const { title: contentTitle, socialImage, description: contentDescription, image } = content;
1010
1111
const pageTitle = contentTitle ? `${title}${contentTitle}` : title;
12-
const imageSrc = socialImage || siteImage;
12+
// Check if this is an article page
13+
const isArticle = contentTitle && content.date;
14+
const imageSrc = isArticle ? (socialImage || siteImage) : icon;
1315
const description = contentDescription || siteDescription;
1416
const preloadImage = image ? `${image}?x-oss-process=image/resize,w_1200/format,webp` : false;
1517
const canonicalURL = new URL(pageURL, homePage).href;
1618
17-
// Check if this is an article page
18-
const isArticle = contentTitle && content.date;
19-
2019
// Structured data
2120
const structuredData = isArticle
2221
? {

src/supportCallout.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ export const SUPPORT_CALLOUT = {
44
link: "https://miaoyan.app/cats.html?name=潮流周刊",
55
};
66

7-
export const renderSupportCalloutForRSS = () => {
8-
const { cta, link } = SUPPORT_CALLOUT;
7+
export const renderSupportCalloutForRSS = (lang: "zh" | "en" = "zh") => {
8+
const cta = SUPPORT_CALLOUT[lang];
9+
const { link } = SUPPORT_CALLOUT;
910
return `
1011
<hr style="border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;" />
1112
<p style="text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">

0 commit comments

Comments
 (0)