Skip to content

Commit edb5be6

Browse files
committed
构建搜索索引时忽略部分组件
1 parent 841d135 commit edb5be6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/components/FooterLinks.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const year = new Date().getFullYear();
44
const showICP = import.meta.env.PUBLIC_SITE_URL === "https://docs.hmcl.net";
55
---
66

7-
<section class="sl-flex">
7+
<section class="sl-flex" data-pagefind-ignore>
88
{showICP && <a href="https://beian.miit.gov.cn">粤ICP备18071565号</a>}
99
<span
1010
>© <span id="current-year">{year}</span>

src/components/UnofficialSiteAlert.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
---
44

5-
<div class="unofficial-site-alert">
5+
<div class="unofficial-site-alert" data-pagefind-ignore>
66
您正在访问第三方构建的文档站。如需查看官方文档,请<a href="https://docs.hmcl.net">点击此处</a
77
>跳转。
88
</div>

src/components/starlight/PageTitle.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const showContributors = Array.isArray(contributors) && contributors.length > 0;
2626
<DefaultPageTitle />
2727

2828
<div class="info">
29-
<div class="hits">
29+
<div class="hits" data-pagefind-ignore>
3030
<strong>{Astro.locals.t("page.hits.label")}</strong>
3131
<HitsInfo
3232
tag={tag}
@@ -41,7 +41,8 @@ const showContributors = Array.isArray(contributors) && contributors.length > 0;
4141
{
4242
showContributors && (
4343
<div class="contributors">
44-
<strong>{Astro.locals.t("page.contributors")}</strong> {contributors.join(" ")}
44+
<strong data-pagefind-ignore>{Astro.locals.t("page.contributors")}</strong>{" "}
45+
{contributors.join(" ")}
4546
</div>
4647
)
4748
}

0 commit comments

Comments
 (0)