summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_partials/footer.html2
-rw-r--r--layouts/_partials/header.html2
-rw-r--r--layouts/_partials/home/latest-posts.html2
-rw-r--r--layouts/featured.html2
-rw-r--r--layouts/fictions/section.html4
-rw-r--r--layouts/home.html2
-rw-r--r--layouts/library/section.html4
-rw-r--r--layouts/library/yearlist.html4
-rw-r--r--layouts/page.html2
-rw-r--r--layouts/posts/page.html2
-rw-r--r--layouts/section.html4
-rw-r--r--layouts/taxonomy.html2
-rw-r--r--layouts/uncategorized.html2
-rw-r--r--pagefind.yml8
14 files changed, 18 insertions, 24 deletions
diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html
index 776e12a9..baf79c06 100644
--- a/layouts/_partials/footer.html
+++ b/layouts/_partials/footer.html
@@ -1,4 +1,4 @@
-<footer class="my-8 mx-auto font-mono
+<footer class="pagefind-exclude my-8 mx-auto font-mono
md:w-[var(--page-width)] md:flex md:justify-between">
<!-- copyright -->
<section>
diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html
index f379711c..a62b56bd 100644
--- a/layouts/_partials/header.html
+++ b/layouts/_partials/header.html
@@ -1,4 +1,4 @@
-<header id="site-header">
+<header class="pagefind-exclude">
<!-- Header Title -->
<div class="flex flex-col items-center gap-2">
{{ partial "components/logo" (dict "imageClass" "w-[10rem]") }}
diff --git a/layouts/_partials/home/latest-posts.html b/layouts/_partials/home/latest-posts.html
index 85b0e7ec..d98f9e1c 100644
--- a/layouts/_partials/home/latest-posts.html
+++ b/layouts/_partials/home/latest-posts.html
@@ -1,5 +1,5 @@
<!-- Latest Posts -->
-<section id="latest-posts">
+<section class="pagefind-exclude">
<div class="flex flex-col my-4">
{{ $firstPost := true }} <!-- 初始化标记 -->
{{ range first 8 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
diff --git a/layouts/featured.html b/layouts/featured.html
index d01e217c..e93ecf76 100644
--- a/layouts/featured.html
+++ b/layouts/featured.html
@@ -1,5 +1,5 @@
{{ define "main" }}
- <article class="index">
+ <article>
{{ partial "header" . }}
{{ partial "home/home-nav" . }}
diff --git a/layouts/fictions/section.html b/layouts/fictions/section.html
index d4b68581..e459ce1d 100644
--- a/layouts/fictions/section.html
+++ b/layouts/fictions/section.html
@@ -1,7 +1,7 @@
{{ define "main" }}
- <article class="fiction-list-page">
+ <article>
{{ partial "header.html" . }}
- <div id="fiction-section">
+ <div class="pagefind-exclude">
<div class="my-8 markdown-body">
{{ with .Content }}{{ . }}{{ end }}
</div>
diff --git a/layouts/home.html b/layouts/home.html
index 2753ab2f..19b9d21c 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -1,5 +1,5 @@
{{ define "main" }}
- <article class="index">
+ <article>
{{ partial "header" . }}
{{ partial "home/home-nav" . }}
{{ partial "home/latest-posts" . }}
diff --git a/layouts/library/section.html b/layouts/library/section.html
index 21107382..3910bcad 100644
--- a/layouts/library/section.html
+++ b/layouts/library/section.html
@@ -1,7 +1,7 @@
{{ define "main" }}
{{ partial "header.html" . }}
- <article id="library">
- <div id="library-content">
+ <article class="pagefind-exclude">
+ <div>
<h2>{{ now.Year }} 年读的书</h2>
<div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4">
{{ range where .Site.RegularPages "Section" "library" }}
diff --git a/layouts/library/yearlist.html b/layouts/library/yearlist.html
index d80fe56e..ed62f014 100644
--- a/layouts/library/yearlist.html
+++ b/layouts/library/yearlist.html
@@ -1,7 +1,7 @@
{{ define "main" }}
{{ partial "header.html" . }}
- <article id="library">
- <div id="library-content">
+ <article class="pagefind-exclude">
+ <div>
<h2>{{ .Title }}</h2> <!-- 显示年份 -->
<div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4">
{{ $year := .Title }}
diff --git a/layouts/page.html b/layouts/page.html
index b0da162b..e8e4221b 100644
--- a/layouts/page.html
+++ b/layouts/page.html
@@ -1,6 +1,6 @@
{{ define "main" }}
{{ partial "header.html" . }}
- <article class="page" id="article">
+ <article>
<div id="post-content" class="post-content markdown-body leading-loose"
style="view-transition-name: post-content-{{ .File.UniqueID }}">
{{ .Content }}
diff --git a/layouts/posts/page.html b/layouts/posts/page.html
index d5506f01..f965f0bb 100644
--- a/layouts/posts/page.html
+++ b/layouts/posts/page.html
@@ -1,5 +1,5 @@
{{ define "main" }}
- <article class="post" id="article">
+ <article>
<!-- Post Header -->
<header
style="view-transition-name: post-{{ .File.UniqueID }}"
diff --git a/layouts/section.html b/layouts/section.html
index 8d5f6c9b..47ece146 100644
--- a/layouts/section.html
+++ b/layouts/section.html
@@ -1,7 +1,7 @@
{{ define "main" }}
- <article class="posts">
+ <article>
{{ partial "header.html" . }}
- <div id="posts-archive" class="posts-list">
+ <div class="posts-list pagefind-exclude">
<!-- Post Archive List -->
{{ $remainingMonthsToOpen := 3 }}
{{ range (where site.RegularPages "Type" "eq" "posts").GroupByDate "2006" -}}
diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html
index 514440e6..9682d36a 100644
--- a/layouts/taxonomy.html
+++ b/layouts/taxonomy.html
@@ -1,5 +1,5 @@
{{ define "main" }}
-<article class="taxonomy">
+<article>
{{ partial "header" . }}
{{ partial "home/home-nav" . }}
diff --git a/layouts/uncategorized.html b/layouts/uncategorized.html
index 0eed855c..2b67c387 100644
--- a/layouts/uncategorized.html
+++ b/layouts/uncategorized.html
@@ -1,5 +1,5 @@
{{ define "main" }}
- <article class="posts termlist-page">
+ <article>
{{ partial "header" . }}
{{ partial "home/home-nav" . }}
<h1 class="term-title">{{ .Title }}</h1>
diff --git a/pagefind.yml b/pagefind.yml
index e3c2c723..3419a66f 100644
--- a/pagefind.yml
+++ b/pagefind.yml
@@ -1,9 +1,3 @@
site: public
exclude_selectors:
- - "#footer"
- - "#site-header"
- - "#latest-posts"
- - "#posts-archive"
- - ".cards-section"
- - "#fiction-section"
- - "#library"
+ - '.pagefind-exclude'