优化细节✅

This commit is contained in:
Han
2025-06-06 11:02:14 +08:00
parent 2aa978451d
commit a515ecae39
5 changed files with 30 additions and 10 deletions
+4
View File
@@ -205,6 +205,10 @@ aside.vh-aside {
p {
padding: 0.28rem 0;
}
img {
max-width: 100%;
}
}
}
+3 -2
View File
@@ -10,8 +10,9 @@ const WebTitle = Title || SiteName;
const SiteCover = Site + Cover;
const WebCover = PageCover || SiteCover;
// Schema.org 结构化数据(JSON-LD)
const WebSiteData = { "@context": "https://schema.org", "@type": "WebSite", name: WebTitle, url: canonicalURL, image: { "@type": "ImageObject", url: SiteCover } };
const ArticleData = { "@context": "https://schema.org", "@type": "BlogPosting", headline: WebTitle, image: [WebCover], author: { "@type": "Person", name: Author, url: Site }, publisher: { "@type": "Organization", name: SiteName, logo: { "@type": "ImageObject", url: SiteCover } } };
const WebSiteData = { "@context": "https://schema.org", "@type": "WebSite", url: canonicalURL, name: WebTitle, description: Description, inLanguage: "zh-CN", image: WebCover, publisher: { "@type": "Organization", name: WebTitle, logo: { "@type": "ImageObject", url: SiteCover } } };
const ArticleData = { "@context": "https://schema.org", "@type": "BlogPosting", mainEntityOfPage: { "@type": "WebPage", "@id": canonicalURL }, headline: WebTitle, description: Description, image: [WebCover], datePublished: new Date().toISOString().replace("Z", `+08:00`), dateModified: new Date().toISOString().replace("Z", `+08:00`), author: { "@type": "Person", name: Author, url: Site }, publisher: { "@type": "Organization", name: SiteName, logo: { "@type": "ImageObject", url: SiteCover } }, keywords: (Keywords || ["Astro", "分享", "博客"]).join(", ") };
// 基础 样式
import "@/styles/Base.less";
---
+20 -4
View File
@@ -3,7 +3,23 @@ import SITE_INFO from "@/config";
import "./Reward.less";
---
<section class="vh-reward">
<p>喜欢这篇文章嘛,觉得文章不错的话,奖励奖励我!</p>
<div class="reward-list"><span class="alipay"><img src={SITE_INFO.Reward.AliPay} alt="支付宝打赏" />支付宝</span><span class="wechat"><img src={SITE_INFO.Reward.WeChat} alt="微信打赏" /> 微信</span></div>
</section>
{
SITE_INFO.Reward.AliPay && SITE_INFO.Reward.WeChat && (
<section class="vh-reward">
<p>喜欢这篇文章嘛,觉得文章不错的话,奖励奖励我!</p>
<div class="reward-list">
{SITE_INFO.Reward.AliPay && (
<span class="alipay">
<img src={SITE_INFO.Reward.AliPay} alt="支付宝打赏" />
支付宝
</span>
)}
{SITE_INFO.Reward.WeChat && (
<span class="wechat">
<img src={SITE_INFO.Reward.WeChat} alt="微信打赏" /> 微信
</span>
)}
</div>
</section>
)
}