diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..177d9f2e
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,10 @@
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+indent_size = 2
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..694b1bf2
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,40 @@
+# https://github.com/gohugoio/hugo/blob/b39b24962350090122b5f3927456dde710cffb57/docs/.prettierignore
+# https://github.com/gohugoio/hugo/blob/b39b24962350090122b5f3927456dde710cffb57/docs/.prettierrc
+
+# develop
+.vscode
+node_modules
+package.json
+
+# Hugo
+assets/lib
+assets/css/compiled
+content
+themes
+public
+static
+*.md
+
+# Invalid nodes and unexpected tokens, mostly caused by unmatched tags in Hugo statements.
+# For example:
+# {{ with .Params.externalUrl }}
+#
+# {{ else }}
+#
+# {{ end }}
+#
+# This create an unclose node
+
+layouts/_default/_markup/render-heading.html
+layouts/_default/index.json
+layouts/_default/list.html
+layouts/partials/article-link/card-related.html
+layouts/partials/article-link/card.html
+layouts/partials/article-link/simple.html
+layouts/partials/header/basic.html
+layouts/partials/hero/background.html
+layouts/partials/head.html
+layouts/shortcodes/screenshot.html
+layouts/shortcodes/figure.html
+
+assets/js/appearance.js
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..081022e5
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,45 @@
+{
+ "singleQuote": false,
+ "tabWidth": 2,
+ "useTabs": false,
+ "semi": true,
+ "trailingComma": "all",
+ "proseWrap": "always",
+ "plugins": [
+ "prettier-plugin-go-template",
+ "@awmottaz/prettier-plugin-void-html"
+ ],
+ "overrides": [
+ {
+ "files": ["*.html"],
+ "options": {
+ "useTabs": false,
+ "parser": "go-template",
+ "goTemplateBracketSpacing": true,
+ "printWidth": 112,
+ "bracketSameLine": true
+ }
+ },
+ {
+ "files": ["*.js", "*.mjs", "*.mts", "*.ts"],
+ "options": {
+ "semi": true,
+ "useTabs": false,
+ "printWidth": 112,
+ "singleQuote": false
+ }
+ },
+ {
+ "files": ["*.yml", "*.yaml"],
+ "options": {
+ "singleQuote": false
+ }
+ },
+ {
+ "files": ["*.json*"],
+ "options": {
+ "trailingComma": "none"
+ }
+ }
+ ]
+}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 804668a2..c9bf63e6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -45,7 +45,7 @@ The project includes a Prettier config that helps to format code in line with th
#### Commit message guidelines
-- Use [Gitmoji](https://gitmoji.dev) in commit messages to provide context.
+- Use [Gitmoji](https://gitmoji.dev) in PR messages to provide context.
- Clearly describe the change with a short summary in the first 72 characters.
- Place more detailed explanations in paragraphs below the summary, separated by a blank line.
- Use imperative language (ie. "Fix bug", not "Fixed bug" or "Fixes bug").
diff --git a/package-lock.json b/package-lock.json
index 5b8f098e..4e0658c6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,6 +17,7 @@
"commander": "^14.0.0"
},
"devDependencies": {
+ "@awmottaz/prettier-plugin-void-html": "^1.8.0",
"@tailwindcss/cli": "^4.1.7",
"@tailwindcss/typography": "^0.5.16",
"chart.js": "^4.4.9",
@@ -77,6 +78,19 @@
"url": "https://github.com/sponsors/antfu"
}
},
+ "node_modules/@awmottaz/prettier-plugin-void-html": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@awmottaz/prettier-plugin-void-html/-/prettier-plugin-void-html-1.8.0.tgz",
+ "integrity": "sha512-gC1CO6TdjILFBc9UYJHY93RvM76jbNhb8IMiFzNbhyH1aCqvSVVjIhXCEQ9BkLyXGy8gmPfHX3m9BKHnl0edhQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=22.0.0"
+ },
+ "peerDependencies": {
+ "prettier": "3.0.0 - 3.5.x"
+ }
+ },
"node_modules/@babel/code-frame": {
"version": "7.23.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
diff --git a/package.json b/package.json
index 7010a1dc..947d6881 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
},
"homepage": "https://github.com/nunocoracao/blowfish#readme",
"devDependencies": {
+ "@awmottaz/prettier-plugin-void-html": "^1.8.0",
"@tailwindcss/cli": "^4.1.7",
"@tailwindcss/typography": "^0.5.16",
"chart.js": "^4.4.9",
@@ -123,4 +124,4 @@
"@tailwindcss/forms": "^0.5.10",
"commander": "^14.0.0"
}
-}
\ No newline at end of file
+}