mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-14 18:18:22 +00:00
[Add] search
This commit is contained in:
1 parent
c297097241
commit
44fdfc2e71
6 files changed
+34
-5
No files matched your search
+11
-2
@@ -1,4 +1,4 @@
|
||||
baseURL:
|
||||
baseURL: /
|
||||
title: miti99
|
||||
theme: hugo-coder
|
||||
languageCode: vi
|
||||
@@ -105,10 +105,19 @@ languages:
|
||||
- name: Pages
|
||||
weight: 3
|
||||
url: pages/
|
||||
- name: Tags
|
||||
- name: Search
|
||||
weight: 4
|
||||
url: search/
|
||||
- name: Tags
|
||||
weight: 5
|
||||
url: tags/
|
||||
- name: Web CV
|
||||
url: https://tiennm99.github.io/webcv
|
||||
- name: PDF CV
|
||||
url: https://tiennm99.github.io/cv/miti99.pdf
|
||||
|
||||
outputs:
|
||||
home:
|
||||
- html
|
||||
- rss
|
||||
- json
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: "Giới thiệu"
|
||||
slug: "about"
|
||||
---
|
||||
|
||||
Xin chào, mừng bạn đã đến với trang của mình.
|
||||
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
---
|
||||
title: "Pages"
|
||||
slug: "pages"
|
||||
---
|
||||
|
||||
Danh sách những trang mình host trên [GitHub Pages](https://pages.github.com/). Thường khá thú vị :>
|
||||
|
||||
_(Danh sách này được tạo tự động, thứ tự không quan trọng nhé)_
|
||||
|
||||
{{< github-pages >}}
|
||||
{{< github-pages >}}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Tìm kiếm
|
||||
---
|
||||
|
||||
{{< search >}}
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{{- range $i, $p := .Site.RegularPages -}}
|
||||
{{- if gt $i 0 -}},{{- end -}}
|
||||
{{- dict "uri" $p.RelPermalink "title" $p.Title "content" ($p.Plain | htmlUnescape | plainify) | jsonify -}}
|
||||
{{- end -}}
|
||||
]
|
||||
@@ -0,0 +1,11 @@
|
||||
<input type="search" id="search-input">
|
||||
|
||||
<div class="search-results">
|
||||
<section>
|
||||
<h2 class="toc-line"><a target="_blank"></a><span class="dots"></span><span class="page-num small"></span></h2>
|
||||
<div class="search-preview"></div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.6.2" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@xiee/utils/js/fuse-search.min.js" defer></script>
|
||||
Reference in new issue
Block a user