diff --git a/lefthook.yml b/lefthook.yml index b72d39a..98d7897 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -25,13 +25,21 @@ pre-commit: run: npx markdownlint-cli {staged_files} --fix other: glob: '*.{yml,json,html}' - exclude: 'group_*.json' - run: npx prettier {staged_files} --write + exclude: 'group_*.json' # Exclude specific files + run: | + staged_files="$LEFTHOOK_STAGED_FILES" + for file in $staged_files + do + if [[ ! "$file" =~ ^templates/ ]]; then + npx prettier "$file" --write + fi + done stage_fixed: true + stage: pre-commit merge-conflict: run: echo "Resolve merge conflicts before committing" exit-status: run: echo "All pre-commit checks passed" templates-exclude: - glob: 'templates/**/*.php' + glob: 'templates/**' # Match all files and subdirectories within templates folder run: echo "Skipping templates folder" diff --git a/templates/index.html b/templates/index.html index 08028bf..d2c0969 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,14 +1,7 @@ -
+
diff --git a/templates/no-title.html b/templates/no-title.html index 861d4f6..1e7ab43 100644 --- a/templates/no-title.html +++ b/templates/no-title.html @@ -1,13 +1,7 @@ -
+
diff --git a/templates/page.html b/templates/page.html index 602283e..eee92da 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,14 +1,7 @@ -
+