diff --git a/.gitmodules b/.gitmodules index 12232b0..13b9424 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "themes/hugo-theme-stack"] - path = themes/hugo-theme-stack - url = https://github.com/CaiJimmy/hugo-theme-stack/ +[submodule "themes/tsuki"] + path = themes/tsuki + url = https://github.com/tiennm99/tsuki.git diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml index cf17d96..ba2ce07 100644 --- a/config/_default/hugo.yml +++ b/config/_default/hugo.yml @@ -1,6 +1,6 @@ baseurl: https://miti99.com/ languageCode: vi -theme: hugo-theme-stack +theme: tsuki title: miti99 defaultContentLanguage: vi hasCJKLanguage: false diff --git a/config/_default/markup.yml b/config/_default/markup.yml index aa5e735..26cb7fe 100644 --- a/config/_default/markup.yml +++ b/config/_default/markup.yml @@ -13,6 +13,8 @@ goldmark: - \) renderer: unsafe: true + parser: + autoHeadingIDType: github-ascii tableOfContents: endLevel: 4 diff --git a/config/_default/params.yml b/config/_default/params.yml index ff2a05e..ba9f687 100644 --- a/config/_default/params.yml +++ b/config/_default/params.yml @@ -4,6 +4,18 @@ featuredImageField: image rssFullContent: true favicon: /favicon.png +# tsuki theme options +search: + enable: true + +home: + recentPostsCount: 5 + +# Stack params below are ignored by tsuki but kept for now in case of rollback. +# To clean up: remove sidebar, widgets, article.toc/readingTime/license, +# comments.{disqusjs,utterances,beaudar,remark42,vssue,waline,twikoo,cactus,gitalk,cusdis}, +# imageProcessing, colorScheme, defaultImage, opengraph.twitter + footer: since: 2020 customText: "Made by miti99 with ❤️" @@ -88,14 +100,22 @@ comments: siteName: "" giscus: + enable: true repo: tiennm99/miti99 - repoID: R_kgDOILzXrw + repoId: R_kgDOILzXrw category: Announcements - categoryID: DIC_kwDOILzXr84CeYAw + categoryId: DIC_kwDOILzXr84CeYAw mapping: pathname + strict: "0" + reactionsEnabled: "1" + inputPosition: bottom + theme: preferred_color_scheme + lang: vi + # Legacy Stack keys kept for reference; ignored by tsuki: + repoID: R_kgDOILzXrw + categoryID: DIC_kwDOILzXr84CeYAw lightTheme: light darkTheme: dark - reactionsEnabled: 1 emitMetadata: 0 gitalk: diff --git a/config/_default/permalinks.yml b/config/_default/permalinks.yml index 25722e9..93f92eb 100644 --- a/config/_default/permalinks.yml +++ b/config/_default/permalinks.yml @@ -1,2 +1,2 @@ -# post: /p/:slug/ +post: /p/:slug/ page: /:slug/ diff --git a/content/archives/_index.md b/content/archives/_index.md new file mode 100644 index 0000000..9bb841a --- /dev/null +++ b/content/archives/_index.md @@ -0,0 +1,9 @@ +--- +title: "Archives" +description: "Toàn bộ bài viết theo năm và tháng." +menu: + main: + weight: -70 + params: + icon: archives +--- diff --git a/content/page/archives/index.md b/content/page/archives/index.md deleted file mode 100644 index cbea2f9..0000000 --- a/content/page/archives/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Archives -layout: archives -slug: archives -menu: - main: - weight: -70 - params: - icon: archives ---- diff --git a/content/page/search/index.md b/content/page/search/index.md deleted file mode 100644 index b2a5943..0000000 --- a/content/page/search/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -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/search/_index.md b/content/search/_index.md new file mode 100644 index 0000000..eb577e9 --- /dev/null +++ b/content/search/_index.md @@ -0,0 +1,9 @@ +--- +title: "Search" +description: "Tìm kiếm bài viết trên miti99." +menu: + main: + weight: -60 + params: + icon: search +--- diff --git a/data/profile.yaml b/data/profile.yaml new file mode 100644 index 0000000..62378ff --- /dev/null +++ b/data/profile.yaml @@ -0,0 +1,14 @@ +name: "miti99" +handle: "tiennm99" +tagline: "A developer wants to be magician." +avatar: "img/avatar.png" +bio: | + Vietnamese developer. Writing about code, work, and the small things in between. + +links: + - icon: github + label: GitHub + url: https://github.com/tiennm99 + - icon: rss + label: RSS + url: /index.xml diff --git a/static/img/avatar.png b/static/img/avatar.png new file mode 100644 index 0000000..ee811fe Binary files /dev/null and b/static/img/avatar.png differ diff --git a/themes/hugo-theme-stack b/themes/hugo-theme-stack deleted file mode 160000 index d6ced60..0000000 --- a/themes/hugo-theme-stack +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d6ced60f5135ef8da9b0eb31843006ea9d4aca91 diff --git a/themes/tsuki b/themes/tsuki new file mode 160000 index 0000000..d88f18d --- /dev/null +++ b/themes/tsuki @@ -0,0 +1 @@ +Subproject commit d88f18d33f9e555fb7c718a18959a8b22222c97c