From d4e50ac684de1e6232a105abcf18bfd18b4674db Mon Sep 17 00:00:00 2001 From: attajak Date: Fri, 24 Jan 2025 04:31:30 +0700 Subject: [PATCH] Add pre-commit --- .pre-commit-config.yaml | 19 +++++++++++++++++++ config/_default/params.toml | 1 - config/_default/sitemap.toml | 2 +- content/posts/hacker-keyboard.md | 2 +- content/posts/swiftkey-keyboard.md | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..be2abdc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - id: end-of-file-fixer + - id: check-yaml + args: ['--allow-multiple-documents'] + - id: check-toml + - id: check-json + - id: check-added-large-files + args: ['--enforce-all'] + - id: mixed-line-ending + args: ['--fix=auto'] + - id: pretty-format-json + args: ['--autofix', '--no-sort-keys'] diff --git a/config/_default/params.toml b/config/_default/params.toml index bf865f9..e1c13f9 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -978,4 +978,3 @@ disableThemeInject = false [page.seo.publisher] name = "" logoUrl = "" - diff --git a/config/_default/sitemap.toml b/config/_default/sitemap.toml index d83eff5..ceb6743 100644 --- a/config/_default/sitemap.toml +++ b/config/_default/sitemap.toml @@ -5,4 +5,4 @@ changefreq = "weekly" filename = "sitemap.xml" -priority = 0.5 \ No newline at end of file +priority = 0.5 diff --git a/content/posts/hacker-keyboard.md b/content/posts/hacker-keyboard.md index 32635a2..e930bf6 100644 --- a/content/posts/hacker-keyboard.md +++ b/content/posts/hacker-keyboard.md @@ -75,4 +75,4 @@ auto-complete - auto-complete เวอร์ชัน Pro - Pro version -**ที่มา:** Google Gemini \ No newline at end of file +**ที่มา:** Google Gemini diff --git a/content/posts/swiftkey-keyboard.md b/content/posts/swiftkey-keyboard.md index 671e289..1bb99f8 100644 --- a/content/posts/swiftkey-keyboard.md +++ b/content/posts/swiftkey-keyboard.md @@ -66,4 +66,4 @@ SwiftKey Keyboard เป็นแป้นพิมพ์ AI ที่ยอด **ที่มา:** [Microsoft Copilot](https://copilot.microsoft.com) -![Swiftkey-Keyboard](https://attajak.github.io/assets/images/swiftkey-keyboard/swiftkey-keyboard.png) \ No newline at end of file +![Swiftkey-Keyboard](https://attajak.github.io/assets/images/swiftkey-keyboard/swiftkey-keyboard.png)