From 0d9cef0aea3559550654ef1a5ec4a3c27fd3458a Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sat, 21 Dec 2024 16:16:19 +0700 Subject: [PATCH] [Theme] (Change) migrate content to theme stack --- assets/icons/brand-facebook.svg | 1 + assets/icons/brand-github.svg | 1 + assets/icons/brand-gitlab.svg | 1 + assets/icons/brand-linkedin.svg | 1 + assets/icons/brand-twitter.svg | 1 + assets/icons/brand-youtube.svg | 1 + assets/icons/list.svg | 1 + {static/images => assets/img}/avatar.jpg | Bin {static/images => assets/img}/logo.png | Bin assets/jsconfig.json | 10 + config.yml | 123 ----------- content/_index.md | 8 + content/{ => page/about}/about.md | 12 +- content/page/archives/index.md | 11 + content/page/links/index.md | 19 ++ content/{pages.md => page/pages/index.md} | 7 +- content/page/search/index.md | 13 ++ content/{posts => post}/2020/04/07/index.md | 0 content/{posts => post}/2020/04/08/index.md | 0 content/{posts => post}/2020/04/13/index.md | 0 content/{posts => post}/2020/04/14/index.md | 0 content/{posts => post}/2020/04/15/index.md | 0 content/{posts => post}/2020/04/16/index.md | 0 content/{posts => post}/2020/04/17/index.md | 0 content/{posts => post}/2020/04/18/index.md | 0 content/{posts => post}/2020/04/19/index.md | 0 content/{posts => post}/2020/04/20/index.md | 0 content/{posts => post}/2020/04/29/index.md | 0 content/{posts => post}/2020/04/30/index.md | 0 content/{posts => post}/2020/05/01/index.md | 0 content/{posts => post}/2020/05/02/index.md | 0 content/{posts => post}/2020/05/03/index.md | 0 content/{posts => post}/2020/05/04/index.md | 0 content/{posts => post}/2020/05/06/index.md | 0 content/{posts => post}/2020/05/07/index.md | 0 content/{posts => post}/2020/05/08/index.md | 0 content/{posts => post}/2020/05/09/index.md | 0 content/{posts => post}/2020/05/13/index.md | 0 content/{posts => post}/2020/05/14/index.md | 0 content/{posts => post}/2020/05/20/index.md | 0 content/{posts => post}/2020/06/06/index.md | 0 content/{posts => post}/2020/06/10/index.md | 0 content/{posts => post}/2020/06/23/index.md | 0 content/{posts => post}/2020/06/26/index.md | 0 content/{posts => post}/2020/06/27/index.md | 0 content/{posts => post}/2020/06/28/img/1.png | Bin content/{posts => post}/2020/06/28/img/2.png | Bin content/{posts => post}/2020/06/28/index.md | 0 content/{posts => post}/2020/06/29/index.md | 0 content/{posts => post}/2021/10/04/index.md | 0 content/{posts => post}/2021/11/17/index.md | 0 content/{posts => post}/2021/11/21/index.md | 0 content/{posts => post}/2022/11/27/img/1.png | Bin content/{posts => post}/2022/11/27/img/2.png | Bin content/{posts => post}/2022/11/27/img/3.png | Bin content/{posts => post}/2022/11/27/img/4.png | Bin content/{posts => post}/2022/11/27/img/5.png | Bin content/{posts => post}/2022/11/27/img/6.png | Bin content/{posts => post}/2022/11/27/img/7.png | Bin content/{posts => post}/2022/11/27/index.md | 0 content/{posts => post}/2023/03/19/index.md | 0 content/{posts => post}/2024/09/25/index.md | 0 content/{posts => post}/2024/12/1/index.md | 0 content/search.md | 9 - hugo.yml | 207 +++++++++++++++++++ layouts/_default/index.json | 5 - layouts/shortcodes/search.html | 23 --- static/{images => }/favicon.png | Bin static/js/search.js | 108 ---------- 69 files changed, 292 insertions(+), 270 deletions(-) create mode 100644 assets/icons/brand-facebook.svg create mode 100644 assets/icons/brand-github.svg create mode 100644 assets/icons/brand-gitlab.svg create mode 100644 assets/icons/brand-linkedin.svg create mode 100644 assets/icons/brand-twitter.svg create mode 100644 assets/icons/brand-youtube.svg create mode 100644 assets/icons/list.svg rename {static/images => assets/img}/avatar.jpg (100%) rename {static/images => assets/img}/logo.png (100%) create mode 100644 assets/jsconfig.json delete mode 100644 config.yml create mode 100644 content/_index.md rename content/{ => page/about}/about.md (86%) create mode 100644 content/page/archives/index.md create mode 100644 content/page/links/index.md rename content/{pages.md => page/pages/index.md} (70%) create mode 100644 content/page/search/index.md rename content/{posts => post}/2020/04/07/index.md (100%) rename content/{posts => post}/2020/04/08/index.md (100%) rename content/{posts => post}/2020/04/13/index.md (100%) rename content/{posts => post}/2020/04/14/index.md (100%) rename content/{posts => post}/2020/04/15/index.md (100%) rename content/{posts => post}/2020/04/16/index.md (100%) rename content/{posts => post}/2020/04/17/index.md (100%) rename content/{posts => post}/2020/04/18/index.md (100%) rename content/{posts => post}/2020/04/19/index.md (100%) rename content/{posts => post}/2020/04/20/index.md (100%) rename content/{posts => post}/2020/04/29/index.md (100%) rename content/{posts => post}/2020/04/30/index.md (100%) rename content/{posts => post}/2020/05/01/index.md (100%) rename content/{posts => post}/2020/05/02/index.md (100%) rename content/{posts => post}/2020/05/03/index.md (100%) rename content/{posts => post}/2020/05/04/index.md (100%) rename content/{posts => post}/2020/05/06/index.md (100%) rename content/{posts => post}/2020/05/07/index.md (100%) rename content/{posts => post}/2020/05/08/index.md (100%) rename content/{posts => post}/2020/05/09/index.md (100%) rename content/{posts => post}/2020/05/13/index.md (100%) rename content/{posts => post}/2020/05/14/index.md (100%) rename content/{posts => post}/2020/05/20/index.md (100%) rename content/{posts => post}/2020/06/06/index.md (100%) rename content/{posts => post}/2020/06/10/index.md (100%) rename content/{posts => post}/2020/06/23/index.md (100%) rename content/{posts => post}/2020/06/26/index.md (100%) rename content/{posts => post}/2020/06/27/index.md (100%) rename content/{posts => post}/2020/06/28/img/1.png (100%) rename content/{posts => post}/2020/06/28/img/2.png (100%) rename content/{posts => post}/2020/06/28/index.md (100%) rename content/{posts => post}/2020/06/29/index.md (100%) rename content/{posts => post}/2021/10/04/index.md (100%) rename content/{posts => post}/2021/11/17/index.md (100%) rename content/{posts => post}/2021/11/21/index.md (100%) rename content/{posts => post}/2022/11/27/img/1.png (100%) rename content/{posts => post}/2022/11/27/img/2.png (100%) rename content/{posts => post}/2022/11/27/img/3.png (100%) rename content/{posts => post}/2022/11/27/img/4.png (100%) rename content/{posts => post}/2022/11/27/img/5.png (100%) rename content/{posts => post}/2022/11/27/img/6.png (100%) rename content/{posts => post}/2022/11/27/img/7.png (100%) rename content/{posts => post}/2022/11/27/index.md (100%) rename content/{posts => post}/2023/03/19/index.md (100%) rename content/{posts => post}/2024/09/25/index.md (100%) rename content/{posts => post}/2024/12/1/index.md (100%) delete mode 100644 content/search.md create mode 100644 hugo.yml delete mode 100644 layouts/_default/index.json delete mode 100644 layouts/shortcodes/search.html rename static/{images => }/favicon.png (100%) delete mode 100644 static/js/search.js diff --git a/assets/icons/brand-facebook.svg b/assets/icons/brand-facebook.svg new file mode 100644 index 0000000..47ad743 --- /dev/null +++ b/assets/icons/brand-facebook.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/brand-github.svg b/assets/icons/brand-github.svg new file mode 100644 index 0000000..ad12afd --- /dev/null +++ b/assets/icons/brand-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/brand-gitlab.svg b/assets/icons/brand-gitlab.svg new file mode 100644 index 0000000..6de1fad --- /dev/null +++ b/assets/icons/brand-gitlab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/brand-linkedin.svg b/assets/icons/brand-linkedin.svg new file mode 100644 index 0000000..a98e151 --- /dev/null +++ b/assets/icons/brand-linkedin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/brand-twitter.svg b/assets/icons/brand-twitter.svg new file mode 100644 index 0000000..81650b7 --- /dev/null +++ b/assets/icons/brand-twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/brand-youtube.svg b/assets/icons/brand-youtube.svg new file mode 100644 index 0000000..2f996cf --- /dev/null +++ b/assets/icons/brand-youtube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/list.svg b/assets/icons/list.svg new file mode 100644 index 0000000..cf13977 --- /dev/null +++ b/assets/icons/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/images/avatar.jpg b/assets/img/avatar.jpg similarity index 100% rename from static/images/avatar.jpg rename to assets/img/avatar.jpg diff --git a/static/images/logo.png b/assets/img/logo.png similarity index 100% rename from static/images/logo.png rename to assets/img/logo.png diff --git a/assets/jsconfig.json b/assets/jsconfig.json new file mode 100644 index 0000000..eb498c9 --- /dev/null +++ b/assets/jsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "*": [ + "..\\themes\\hugo-theme-stack\\assets\\*" + ] + } + } +} \ No newline at end of file diff --git a/config.yml b/config.yml deleted file mode 100644 index ca09d82..0000000 --- a/config.yml +++ /dev/null @@ -1,123 +0,0 @@ -baseURL: / -title: miti99 -theme: hugo-coder -languageCode: vi -defaultContentLanguage: vi -paginate: 20 -enableEmoji: true - -services: - googleAnalytics: - id: G-JR36Q9NSNP - -markup: - highlight: - noClasses: false - style: monokai - -params: - author: miti99 - license: CC BY-SA-4.0 - description: miti99's personal website - keywords: blog,developer,personal - info: - - Senior Software Engineer - - Java Game Server Developer - - Magician - avatarURL: images/avatar.jpg - # gravatar: minhtienit99@gmail.com - favicon_32: images/favicon.png - dateFormat: January 2, 2006 - since: 2020 - commit: https://github.com/tiennm99/tiennm99.github.io/tree/ - rtl: false - colorScheme: auto - hideColorSchemeToggle: false - maxSeeAlsoItems: 5 - customCSS: [] - customSCSS: [] - customJS: [] - customRemoteJS: [] - enableTwemoji: true - social: - - name: github - icon: fa-brands fa-github fa-2x - weight: 1 - url: "https://github.com/tiennm99" - - name: gitlab - icon: fa-brands fa-gitlab fa-2x - weight: 2 - url: "https://gitlab.com/miti99" - - name: facebook - icon: fa-brands fa-facebook fa-2x - weight: 3 - url: "https://facebook.com/miti99" - - name: youtube - icon: fa-brands fa-youtube fa-2x - weight: 4 - url: "https://youtube.com/@miti99" - - name: linkedin - icon: fa-brands fa-linkedin fa-2x - weight: 5 - url: "https://www.linkedin.com/in/miti99" - - name: X - icon: fa-brands fa-x-twitter fa-2x - weight: 6 - url: "https://twitter.com/tienthieusac" - - name: RSS - icon: fa-solid fa-rss fa-2x - weight: 7 - url: index.xml - rel: alternate - type: application/rss+xml - giscus: - repo: tiennm99/tiennm99.github.io - repoID: R_kgDOILzXrw - category: Announcements - categoryID: DIC_kwDOILzXr84CeYAw - mapping: pathname - term: - strict: 0 - reactionsEnabled: 1 - emitMetadata: 0 - inputPosition: top - theme: dark - lang: - loading: lazy - -taxonomies: - category: categories - series: series - tag: tags - author: authors - -languages: - vi: - languageName: ":vi:" - menu: - main: - - name: About - weight: 1 - url: about/ - - name: Blog - weight: 2 - url: posts/ - - name: Pages - weight: 3 - url: pages/ - - 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/_index.md b/content/_index.md new file mode 100644 index 0000000..530dfe8 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,8 @@ +--- +menu: + main: + name: Home + weight: -100 + params: + icon: home +--- \ No newline at end of file diff --git a/content/about.md b/content/page/about/about.md similarity index 86% rename from content/about.md rename to content/page/about/about.md index 6dd003f..bc2c646 100644 --- a/content/about.md +++ b/content/page/about/about.md @@ -1,7 +1,17 @@ --- -title: "Giới thiệu" +title: Giới thiệu +description: Về bản thân mình +aliases: + - about-me + - contact +menu: + main: + weight: -90 + params: + icon: user --- + Xin chào, mừng bạn đã đến với trang của mình. Mình tên Minh Tiến, sinh năm 1999 (vì vậy blog là miti99 :)))), sinh viên ngành Khoa học Máy tính khóa 2017 tại trường Đại học Bách Khoa Tp.HCM. diff --git a/content/page/archives/index.md b/content/page/archives/index.md new file mode 100644 index 0000000..2862deb --- /dev/null +++ b/content/page/archives/index.md @@ -0,0 +1,11 @@ +--- +title: "Archives" +date: 2019-05-28 +layout: "archives" +slug: "archives" +menu: + main: + weight: -70 + params: + icon: archives +--- diff --git a/content/page/links/index.md b/content/page/links/index.md new file mode 100644 index 0000000..ffab51b --- /dev/null +++ b/content/page/links/index.md @@ -0,0 +1,19 @@ +--- +title: Links +links: + - title: Web CV + description: CV bản web, xem online + website: https://tiennm99.github.io/webcv + # image: + - title: PDF CV + description: CV dạng file, có thể download + website: https://tiennm99.github.io/cv/miti99.pdf + # image: +menu: + main: + weight: -50 + params: + icon: link + +comments: false +--- diff --git a/content/pages.md b/content/page/pages/index.md similarity index 70% rename from content/pages.md rename to content/page/pages/index.md index a011fb4..d2dbfbb 100644 --- a/content/pages.md +++ b/content/page/pages/index.md @@ -1,5 +1,10 @@ --- -title: "Pages" +title: Pages +description: Danh sách pages đã làm +menu: + main: + params: + icon: list --- Danh sách những trang mình host trên [GitHub Pages](https://pages.github.com/). Thường khá thú vị :> diff --git a/content/page/search/index.md b/content/page/search/index.md new file mode 100644 index 0000000..b2a5943 --- /dev/null +++ b/content/page/search/index.md @@ -0,0 +1,13 @@ +--- +title: "Search" +slug: "search" +layout: "search" +outputs: + - html + - json +menu: + main: + weight: -60 + params: + icon: search +--- \ No newline at end of file diff --git a/content/posts/2020/04/07/index.md b/content/post/2020/04/07/index.md similarity index 100% rename from content/posts/2020/04/07/index.md rename to content/post/2020/04/07/index.md diff --git a/content/posts/2020/04/08/index.md b/content/post/2020/04/08/index.md similarity index 100% rename from content/posts/2020/04/08/index.md rename to content/post/2020/04/08/index.md diff --git a/content/posts/2020/04/13/index.md b/content/post/2020/04/13/index.md similarity index 100% rename from content/posts/2020/04/13/index.md rename to content/post/2020/04/13/index.md diff --git a/content/posts/2020/04/14/index.md b/content/post/2020/04/14/index.md similarity index 100% rename from content/posts/2020/04/14/index.md rename to content/post/2020/04/14/index.md diff --git a/content/posts/2020/04/15/index.md b/content/post/2020/04/15/index.md similarity index 100% rename from content/posts/2020/04/15/index.md rename to content/post/2020/04/15/index.md diff --git a/content/posts/2020/04/16/index.md b/content/post/2020/04/16/index.md similarity index 100% rename from content/posts/2020/04/16/index.md rename to content/post/2020/04/16/index.md diff --git a/content/posts/2020/04/17/index.md b/content/post/2020/04/17/index.md similarity index 100% rename from content/posts/2020/04/17/index.md rename to content/post/2020/04/17/index.md diff --git a/content/posts/2020/04/18/index.md b/content/post/2020/04/18/index.md similarity index 100% rename from content/posts/2020/04/18/index.md rename to content/post/2020/04/18/index.md diff --git a/content/posts/2020/04/19/index.md b/content/post/2020/04/19/index.md similarity index 100% rename from content/posts/2020/04/19/index.md rename to content/post/2020/04/19/index.md diff --git a/content/posts/2020/04/20/index.md b/content/post/2020/04/20/index.md similarity index 100% rename from content/posts/2020/04/20/index.md rename to content/post/2020/04/20/index.md diff --git a/content/posts/2020/04/29/index.md b/content/post/2020/04/29/index.md similarity index 100% rename from content/posts/2020/04/29/index.md rename to content/post/2020/04/29/index.md diff --git a/content/posts/2020/04/30/index.md b/content/post/2020/04/30/index.md similarity index 100% rename from content/posts/2020/04/30/index.md rename to content/post/2020/04/30/index.md diff --git a/content/posts/2020/05/01/index.md b/content/post/2020/05/01/index.md similarity index 100% rename from content/posts/2020/05/01/index.md rename to content/post/2020/05/01/index.md diff --git a/content/posts/2020/05/02/index.md b/content/post/2020/05/02/index.md similarity index 100% rename from content/posts/2020/05/02/index.md rename to content/post/2020/05/02/index.md diff --git a/content/posts/2020/05/03/index.md b/content/post/2020/05/03/index.md similarity index 100% rename from content/posts/2020/05/03/index.md rename to content/post/2020/05/03/index.md diff --git a/content/posts/2020/05/04/index.md b/content/post/2020/05/04/index.md similarity index 100% rename from content/posts/2020/05/04/index.md rename to content/post/2020/05/04/index.md diff --git a/content/posts/2020/05/06/index.md b/content/post/2020/05/06/index.md similarity index 100% rename from content/posts/2020/05/06/index.md rename to content/post/2020/05/06/index.md diff --git a/content/posts/2020/05/07/index.md b/content/post/2020/05/07/index.md similarity index 100% rename from content/posts/2020/05/07/index.md rename to content/post/2020/05/07/index.md diff --git a/content/posts/2020/05/08/index.md b/content/post/2020/05/08/index.md similarity index 100% rename from content/posts/2020/05/08/index.md rename to content/post/2020/05/08/index.md diff --git a/content/posts/2020/05/09/index.md b/content/post/2020/05/09/index.md similarity index 100% rename from content/posts/2020/05/09/index.md rename to content/post/2020/05/09/index.md diff --git a/content/posts/2020/05/13/index.md b/content/post/2020/05/13/index.md similarity index 100% rename from content/posts/2020/05/13/index.md rename to content/post/2020/05/13/index.md diff --git a/content/posts/2020/05/14/index.md b/content/post/2020/05/14/index.md similarity index 100% rename from content/posts/2020/05/14/index.md rename to content/post/2020/05/14/index.md diff --git a/content/posts/2020/05/20/index.md b/content/post/2020/05/20/index.md similarity index 100% rename from content/posts/2020/05/20/index.md rename to content/post/2020/05/20/index.md diff --git a/content/posts/2020/06/06/index.md b/content/post/2020/06/06/index.md similarity index 100% rename from content/posts/2020/06/06/index.md rename to content/post/2020/06/06/index.md diff --git a/content/posts/2020/06/10/index.md b/content/post/2020/06/10/index.md similarity index 100% rename from content/posts/2020/06/10/index.md rename to content/post/2020/06/10/index.md diff --git a/content/posts/2020/06/23/index.md b/content/post/2020/06/23/index.md similarity index 100% rename from content/posts/2020/06/23/index.md rename to content/post/2020/06/23/index.md diff --git a/content/posts/2020/06/26/index.md b/content/post/2020/06/26/index.md similarity index 100% rename from content/posts/2020/06/26/index.md rename to content/post/2020/06/26/index.md diff --git a/content/posts/2020/06/27/index.md b/content/post/2020/06/27/index.md similarity index 100% rename from content/posts/2020/06/27/index.md rename to content/post/2020/06/27/index.md diff --git a/content/posts/2020/06/28/img/1.png b/content/post/2020/06/28/img/1.png similarity index 100% rename from content/posts/2020/06/28/img/1.png rename to content/post/2020/06/28/img/1.png diff --git a/content/posts/2020/06/28/img/2.png b/content/post/2020/06/28/img/2.png similarity index 100% rename from content/posts/2020/06/28/img/2.png rename to content/post/2020/06/28/img/2.png diff --git a/content/posts/2020/06/28/index.md b/content/post/2020/06/28/index.md similarity index 100% rename from content/posts/2020/06/28/index.md rename to content/post/2020/06/28/index.md diff --git a/content/posts/2020/06/29/index.md b/content/post/2020/06/29/index.md similarity index 100% rename from content/posts/2020/06/29/index.md rename to content/post/2020/06/29/index.md diff --git a/content/posts/2021/10/04/index.md b/content/post/2021/10/04/index.md similarity index 100% rename from content/posts/2021/10/04/index.md rename to content/post/2021/10/04/index.md diff --git a/content/posts/2021/11/17/index.md b/content/post/2021/11/17/index.md similarity index 100% rename from content/posts/2021/11/17/index.md rename to content/post/2021/11/17/index.md diff --git a/content/posts/2021/11/21/index.md b/content/post/2021/11/21/index.md similarity index 100% rename from content/posts/2021/11/21/index.md rename to content/post/2021/11/21/index.md diff --git a/content/posts/2022/11/27/img/1.png b/content/post/2022/11/27/img/1.png similarity index 100% rename from content/posts/2022/11/27/img/1.png rename to content/post/2022/11/27/img/1.png diff --git a/content/posts/2022/11/27/img/2.png b/content/post/2022/11/27/img/2.png similarity index 100% rename from content/posts/2022/11/27/img/2.png rename to content/post/2022/11/27/img/2.png diff --git a/content/posts/2022/11/27/img/3.png b/content/post/2022/11/27/img/3.png similarity index 100% rename from content/posts/2022/11/27/img/3.png rename to content/post/2022/11/27/img/3.png diff --git a/content/posts/2022/11/27/img/4.png b/content/post/2022/11/27/img/4.png similarity index 100% rename from content/posts/2022/11/27/img/4.png rename to content/post/2022/11/27/img/4.png diff --git a/content/posts/2022/11/27/img/5.png b/content/post/2022/11/27/img/5.png similarity index 100% rename from content/posts/2022/11/27/img/5.png rename to content/post/2022/11/27/img/5.png diff --git a/content/posts/2022/11/27/img/6.png b/content/post/2022/11/27/img/6.png similarity index 100% rename from content/posts/2022/11/27/img/6.png rename to content/post/2022/11/27/img/6.png diff --git a/content/posts/2022/11/27/img/7.png b/content/post/2022/11/27/img/7.png similarity index 100% rename from content/posts/2022/11/27/img/7.png rename to content/post/2022/11/27/img/7.png diff --git a/content/posts/2022/11/27/index.md b/content/post/2022/11/27/index.md similarity index 100% rename from content/posts/2022/11/27/index.md rename to content/post/2022/11/27/index.md diff --git a/content/posts/2023/03/19/index.md b/content/post/2023/03/19/index.md similarity index 100% rename from content/posts/2023/03/19/index.md rename to content/post/2023/03/19/index.md diff --git a/content/posts/2024/09/25/index.md b/content/post/2024/09/25/index.md similarity index 100% rename from content/posts/2024/09/25/index.md rename to content/post/2024/09/25/index.md diff --git a/content/posts/2024/12/1/index.md b/content/post/2024/12/1/index.md similarity index 100% rename from content/posts/2024/12/1/index.md rename to content/post/2024/12/1/index.md diff --git a/content/search.md b/content/search.md deleted file mode 100644 index ab7d628..0000000 --- a/content/search.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Tìm kiếm -sitemap: - priority : 0.1 ---- - - - -{{< search >}} diff --git a/hugo.yml b/hugo.yml new file mode 100644 index 0000000..8254097 --- /dev/null +++ b/hugo.yml @@ -0,0 +1,207 @@ +baseURL: / +languageCode: vi +theme: hugo-theme-stack +title: miti99 +copyright: miti99 + +# Theme i18n support +# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw +DefaultContentLanguage: vi + +# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] +# This will make .Summary and .WordCount behave correctly for CJK languages. +hasCJKLanguage: false + +languages: + vi: + languageName: Tiếng Việt + title: miti99 + weight: 1 + params: + sidebar: + subtitle: Senior Software Engineer + +services: + # GA Tracking ID + googleAnalytics: + id: G-JR36Q9NSNP + +pagination: + pagerSize: 10 + +permalinks: + post: /p/:slug/ + page: /:slug/ + + +params: + mainSections: + - post + featuredImageField: image + rssFullContent: true + favicon: /favicon.png # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary) + + footer: + since: 2020 + customText: + + dateFormat: + published: Jan 02, 2006 + lastUpdated: Jan 02, 2006 15:04 MST + + sidebar: + emoji: 🧑‍💻 + subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. + avatar: + enabled: true + local: true + src: img/avatar.jpg + + article: + math: false + toc: true + readingTime: true + license: + enabled: true + default: Licensed under CC BY-NC-SA 4.0 + + comments: + enabled: true + provider: giscus + + giscus: + repo: tiennm99/tiennm99.github.io + repoID: R_kgDOILzXrw + category: Announcements + categoryID: DIC_kwDOILzXr84CeYAw + mapping: pathname + lightTheme: light + darkTheme: dark + reactionsEnabled: 1 + emitMetadata: 0 + + widgets: + homepage: + - type: search + - type: archives + params: + limit: 5 + - type: categories + params: + limit: 10 + - type: tag-cloud + params: + limit: 10 + page: + - type: toc + + opengraph: + twitter: + # Your Twitter username + site: tienthieusac + + # Available values: summary, summary_large_image + card: summary_large_image + + defaultImage: + opengraph: + enabled: false + local: false + src: img/logo.png + + colorScheme: + # Display toggle + toggle: true + + # Available values: auto, light, dark + default: auto + + imageProcessing: + cover: + enabled: true + content: + enabled: true + +### Custom menu +### See https://stack.jimmycai.com/config/menu +### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter +menu: + main: [] + + social: + - identifier: facebook + name: Facebook + url: https://facebook.com/miti99 + params: + icon: brand-facebook + + - identifier: github + name: GitHub + url: https://github.com/tiennm99 + params: + icon: brand-github + + - identifier: gitlab + name: GitLab + url: https://gitlab.com/miti99 + params: + icon: brand-gitlab + + - identifier: linkedin + name: LinkedIn + url: https://linkedin.com/in/miti99 + params: + icon: brand-linkedin + + - identifier: twitter + name: Twitter + url: https://twitter.com/tienthieusac + params: + icon: brand-twitter + + - identifier: youtube + name: YouTube + url: https://youtube.com/@miti99 + params: + icon: brand-youtube + +related: + includeNewer: true + threshold: 60 + toLower: false + indices: + - name: tags + weight: 100 + + - name: categories + weight: 200 + +markup: + goldmark: + extensions: + passthrough: + enable: true + delimiters: + block: + - - \[ + - \] + - - $$ + - $$ + inline: + - - \( + - \) + renderer: + ## Set to true if you have HTML content inside Markdown + unsafe: true + tableOfContents: + endLevel: 4 + ordered: true + startLevel: 2 + highlight: + noClasses: false + codeFences: true + guessSyntax: true + lineNoStart: 1 + lineNos: true + lineNumbersInTable: true + tabWidth: 4 diff --git a/layouts/_default/index.json b/layouts/_default/index.json deleted file mode 100644 index c93f805..0000000 --- a/layouts/_default/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} - {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}} -{{- end -}} -{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/shortcodes/search.html b/layouts/shortcodes/search.html deleted file mode 100644 index 39db0e1..0000000 --- a/layouts/shortcodes/search.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - -
-
-
- -
-
-

Matching pages

-
-
-
- - diff --git a/static/images/favicon.png b/static/favicon.png similarity index 100% rename from static/images/favicon.png rename to static/favicon.png diff --git a/static/js/search.js b/static/js/search.js deleted file mode 100644 index add8549..0000000 --- a/static/js/search.js +++ /dev/null @@ -1,108 +0,0 @@ -summaryInclude=60; -var fuseOptions = { - shouldSort: true, - includeMatches: true, - threshold: 0.0, - tokenize:true, - location: 0, - distance: 100, - maxPatternLength: 32, - minMatchCharLength: 1, - keys: [ - {name:"title",weight:0.8}, - {name:"contents",weight:0.5}, - {name:"tags",weight:0.3}, - {name:"categories",weight:0.3} - ] -}; - - -var searchQuery = param("s"); -if(searchQuery){ - $("#search-query").val(searchQuery); - executeSearch(searchQuery); -}else { - $('#search-results').append("

Please enter a word or phrase above

"); -} - - - -function executeSearch(searchQuery){ - $.getJSON( "/index.json", function( data ) { - var pages = data; - var fuse = new Fuse(pages, fuseOptions); - var result = fuse.search(searchQuery); - console.log({"matches":result}); - if(result.length > 0){ - populateResults(result); - }else{ - $('#search-results').append("

No matches found

"); - } - }); -} - -function populateResults(result){ - $.each(result,function(key,value){ - var contents= value.item.contents; - var snippet = ""; - var snippetHighlights=[]; - var tags =[]; - if( fuseOptions.tokenize ){ - snippetHighlights.push(searchQuery); - }else{ - $.each(value.matches,function(matchKey,mvalue){ - if(mvalue.key == "tags" || mvalue.key == "categories" ){ - snippetHighlights.push(mvalue.value); - }else if(mvalue.key == "contents"){ - start = mvalue.indices[0][0]-summaryInclude>0?mvalue.indices[0][0]-summaryInclude:0; - end = mvalue.indices[0][1]+summaryInclude