From d68d11a859f021934760b367b6c3e4f5f9159ab8 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sat, 21 Dec 2024 17:05:58 +0700 Subject: [PATCH] [Config] (Change) split into multi config files --- .github/workflows/{hugo.yaml => hugo.yml} | 0 config/_default/hugo.yml | 8 + config/_default/languages.yml | 5 + config/_default/markup.yml | 29 +++ config/_default/menu.yml | 38 ++++ config/_default/params.yml | 129 ++++++++++++++ config/_default/permalinks.yml | 2 + config/_default/related.yml | 8 + config/_default/services.yml | 2 + content/_index.md | 12 +- content/page/about/{about.md => index.md} | 0 content/page/archives/index.md | 15 +- hugo.yml | 207 ---------------------- 13 files changed, 234 insertions(+), 221 deletions(-) rename .github/workflows/{hugo.yaml => hugo.yml} (100%) create mode 100644 config/_default/hugo.yml create mode 100644 config/_default/languages.yml create mode 100644 config/_default/markup.yml create mode 100644 config/_default/menu.yml create mode 100644 config/_default/params.yml create mode 100644 config/_default/permalinks.yml create mode 100644 config/_default/related.yml create mode 100644 config/_default/services.yml rename content/page/about/{about.md => index.md} (100%) delete mode 100644 hugo.yml diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yml similarity index 100% rename from .github/workflows/hugo.yaml rename to .github/workflows/hugo.yml diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml new file mode 100644 index 0000000..05ca907 --- /dev/null +++ b/config/_default/hugo.yml @@ -0,0 +1,8 @@ +baseurl: / +languageCode: vi +theme: hugo-theme-stack +title: miti99 +defaultContentLanguage: vi +hasCJKLanguage: false +pagination: + pagerSize: 5 diff --git a/config/_default/languages.yml b/config/_default/languages.yml new file mode 100644 index 0000000..59b366b --- /dev/null +++ b/config/_default/languages.yml @@ -0,0 +1,5 @@ +vi: + languageName: Tiếng Việt + languagedirection: ltr + title: miti99 + weight: 1 diff --git a/config/_default/markup.yml b/config/_default/markup.yml new file mode 100644 index 0000000..70b26f1 --- /dev/null +++ b/config/_default/markup.yml @@ -0,0 +1,29 @@ +goldmark: + renderer: + unsafe: true + extensions: + passthrough: + enable: true + delimiters: + block: + - - \[ + - \] + - - $$ + - $$ + inline: + - - \( + - \) + +tableOfContents: + endLevel: 4 + ordered: true + startLevel: 2 + +highlight: + noClasses: false + codeFences: true + guessSyntax: true + lineNoStart: 1 + lineNos: true + lineNumbersInTable: true + tabWidth: 2 diff --git a/config/_default/menu.yml b/config/_default/menu.yml new file mode 100644 index 0000000..93a7295 --- /dev/null +++ b/config/_default/menu.yml @@ -0,0 +1,38 @@ +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 diff --git a/config/_default/params.yml b/config/_default/params.yml new file mode 100644 index 0000000..82895f6 --- /dev/null +++ b/config/_default/params.yml @@ -0,0 +1,129 @@ +mainSections: + - post +featuredImageField: image +rssFullContent: true +favicon: /favicon.png + +footer: + since: 2020 + customText: "" + +dateFormat: + published: Jan 02, 2006 + lastUpdated: Jan 02, 2006 15:04 MST + +sidebar: + emoji: 🧑‍💻 + subtitle: A developer want to be magician + avatar: + enabled: true + local: true + src: img/avatar.jpg + +article: + headingAnchor: false + math: false + toc: true + readingTime: true + license: + enabled: true + default: Licensed under CC BY-NC-SA 4.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: + site: tienthieusac + card: summary_large_image + +defaultImage: + opengraph: + enabled: false + local: false + src: img/logo.png + +colorScheme: + toggle: true + default: auto + +imageProcessing: + cover: + enabled: true + content: + enabled: true + +comments: + enabled: true + provider: giscus + disqusjs: + shortname: "" + apiUrl: "" + apiKey: "" + admin: "" + adminLabel: "" + utterances: + repo: "" + issueTerm: "pathname" + label: "" + remark42: + host: "" + site: "" + locale: "" + vssue: + platform: "" + owner: "" + repo: "" + clientId: "" + clientSecret: "" + autoCreateIssue: false + waline: + serverURL: "" + lang: "" + visitor: "" + avatar: "" + emoji: [ "https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo" ] + requiredMeta: [ "name", "email", "url" ] + placeholder: "" + locale: + admin: "Admin" + twikoo: + envId: "" + region: "" + path: "" + lang: "" + cactus: + defaultHomeserverUrl: "https://matrix.cactus.chat:8448" + serverName: "cactus.chat" + siteName: "" + giscus: + repo: tiennm99/tiennm99.github.io + repoID: R_kgDOILzXrw + category: Announcements + categoryID: DIC_kwDOILzXr84CeYAw + mapping: pathname + lightTheme: light + darkTheme: dark + reactionsEnabled: 1 + emitMetadata: 0 + gitalk: + owner: "" + admin: "" + repo: "" + clientID: "" + clientSecret: "" + cusdis: + host: "" + id: "" diff --git a/config/_default/permalinks.yml b/config/_default/permalinks.yml new file mode 100644 index 0000000..7376221 --- /dev/null +++ b/config/_default/permalinks.yml @@ -0,0 +1,2 @@ +#post: /p/:slug/ +#page: /:slug/ diff --git a/config/_default/related.yml b/config/_default/related.yml new file mode 100644 index 0000000..f441f74 --- /dev/null +++ b/config/_default/related.yml @@ -0,0 +1,8 @@ +includeNewer: true +threshold: 60 +toLower: false +indices: + - name: tags + weight: 100 + - name: categories + weight: 200 diff --git a/config/_default/services.yml b/config/_default/services.yml new file mode 100644 index 0000000..22aaee9 --- /dev/null +++ b/config/_default/services.yml @@ -0,0 +1,2 @@ +googleAnalytics: + id: G-JR36Q9NSNP diff --git a/content/_index.md b/content/_index.md index 530dfe8..facecb9 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,8 +1,8 @@ --- menu: - main: - name: Home - weight: -100 - params: - icon: home ---- \ No newline at end of file + main: + name: Home + weight: -100 + params: + icon: home +--- diff --git a/content/page/about/about.md b/content/page/about/index.md similarity index 100% rename from content/page/about/about.md rename to content/page/about/index.md diff --git a/content/page/archives/index.md b/content/page/archives/index.md index 2862deb..cbea2f9 100644 --- a/content/page/archives/index.md +++ b/content/page/archives/index.md @@ -1,11 +1,10 @@ --- -title: "Archives" -date: 2019-05-28 -layout: "archives" -slug: "archives" +title: Archives +layout: archives +slug: archives menu: - main: - weight: -70 - params: - icon: archives + main: + weight: -70 + params: + icon: archives --- diff --git a/hugo.yml b/hugo.yml deleted file mode 100644 index 8254097..0000000 --- a/hugo.yml +++ /dev/null @@ -1,207 +0,0 @@ -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