diff --git a/config.yml b/config.yml index 1bf77d1..ca09d82 100644 --- a/config.yml +++ b/config.yml @@ -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 diff --git a/content/about.md b/content/about.md index 8d8983b..6dd003f 100644 --- a/content/about.md +++ b/content/about.md @@ -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. diff --git a/content/pages.md b/content/pages.md index cb1f362..a011fb4 100644 --- a/content/pages.md +++ b/content/pages.md @@ -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 >}} \ No newline at end of file +{{< github-pages >}} diff --git a/content/search.md b/content/search.md new file mode 100644 index 0000000..e095632 --- /dev/null +++ b/content/search.md @@ -0,0 +1,5 @@ +--- +title: Tìm kiếm +--- + +{{< search >}} diff --git a/layouts/_default/index.json b/layouts/_default/index.json new file mode 100644 index 0000000..976212a --- /dev/null +++ b/layouts/_default/index.json @@ -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 -}} +] diff --git a/layouts/shortcodes/search.html b/layouts/shortcodes/search.html new file mode 100644 index 0000000..dbc8de6 --- /dev/null +++ b/layouts/shortcodes/search.html @@ -0,0 +1,11 @@ + + +
+ + +