summaryrefslogtreecommitdiff
path: root/layouts/posts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/posts')
-rw-r--r--layouts/posts/single.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index ced18720..dd6d4b8b 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -9,7 +9,7 @@
{{ partial "components/banner.html" . }}
<!-- Title and Subtitle -->
<h1 class="post-title">
- {{ .Title }}
+ <span data-pagefind-meta="title">{{ .Title }}</span>
{{ with .Params.subtitle }}
<small class="post-subtitle">{{ . }}</small>
{{ end }}
@@ -37,7 +37,10 @@
{{ $fuzzyTime = "深夜" }}
{{ end }}
- <time class="post-date" datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}">
+ <time class="post-date"
+ datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}"
+ data-pagefind-sort="date[datetime], weight[data-weight]"
+ data-weight="{{ if .Params.featured }}30{{ else }}20{{ end }}">
{{ .Date.Format "2006年1月2日" }} {{ $fuzzyTime }}
</time>
{{ end }}