Conventional Commits Guide
This repository uses Conventional Commits to enable automatic semantic versioning and changelog generation.
Commit Message Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types
| Type | Description | Version Bump |
|---|---|---|
feat |
A new feature | Minor (0.x.0) |
fix |
A bug fix | Patch (0.0.x) |
docs |
Documentation only changes | Patch (0.0.x) |
style |
Changes that do not affect the meaning of the code | Patch (0.0.x) |
refactor |
A code change that neither fixes a bug nor adds a feature | Patch (0.0.x) |
perf |
A code change that improves performance | Patch (0.0.x) |
test |
Adding missing tests or correcting existing tests | Patch (0.0.x) |
build |
Changes that affect the build system or external dependencies | Patch (0.0.x) |
ci |
Changes to CI configuration files and scripts | Patch (0.0.x) |
chore |
Other changes that don’t modify src or test files | Patch (0.0.x) |
revert |
Reverts a previous commit | Patch (0.0.x) |
Breaking Changes
To indicate a breaking change, add BREAKING CHANGE: to the commit body or add ! after the type:
feat!: complete redesign of landing page
BREAKING CHANGE: The old landing page structure has been completely replaced.
All custom CSS overrides will need to be updated.
This will trigger a Major version bump (x.0.0).
Examples
Feature Addition
feat(landing): add animated hero section
Implements smooth scroll animations and parallax effects
for the hero section to improve user engagement.
Bug Fix
fix(pricing): correct pricing calculation display
Fixes issue where annual pricing discount was not
properly displayed in the pricing cards.
Fixes #123
Breaking Change
feat(assets)!: restructure asset directories
BREAKING CHANGE: Asset paths have been reorganized.
Update all references from /assets/img to /assets/images.
- Moves all images to /assets/images
- Moves all scripts to /assets/js
- Updates all HTML references
Documentation
docs: add setup instructions for local development
Includes Jekyll installation steps and
Ruby dependency management guide.
Chore/Maintenance
chore(deps): update Jekyll to 4.3.0
Updates Jekyll and related plugins for
security patches and performance improvements.
Scopes
Common scopes for this project:
landing- Landing page changespricing- Pricing section changesfeatures- Features section changescontact- Contact form changesnav- Navigation changesfooter- Footer changesassets- Asset changes (images, CSS, JS)seo- SEO and meta tagsjekyll- Jekyll configurationci- CI/CD configurationdocs- Documentationdeps- Dependencies
Automatic Versioning
Our GitHub Actions workflow automatically:
- Analyzes commit messages when code is pushed to
main - Determines version bump based on commit types:
feat:→ Minor version (0.x.0)fix:,docs:, etc. → Patch version (0.0.x)BREAKING CHANGE:or!→ Major version (x.0.0)
- Creates a git tag with the new version
- Generates a release with automatic changelog
- Updates VERSION file in the repository
- Deploys to GitHub Pages automatically
Best Practices
Do ✅
- Use clear, descriptive commit messages
- Include relevant scope when possible
- Reference issue numbers (
Fixes #123,Closes #456) - Use imperative mood (“add feature” not “added feature”)
- Keep the subject line under 100 characters
- Use the body to explain “what” and “why”, not “how”
- Case Style: Mixed case is allowed in commit messages (e.g., “Add Hero Animation” or “Fix OAuth validation”)
Don’t ❌
- Don’t use vague messages like “fix bug” or “update code”
- Don’t forget to specify breaking changes
- Don’t combine multiple unrelated changes in one commit
- Don’t use past tense in commit messages
- Don’t end commit messages with a period
Examples for GitAuditor.io Landing Page
Adding New Sections
feat(landing): add customer testimonials section
Adds a new testimonials carousel showcasing customer
success stories and reviews.
- Implements responsive carousel component
- Adds testimonial data structure
- Includes company logos and quotes
SEO Improvements
feat(seo): add structured data for organization
Implements JSON-LD structured data to improve
search engine visibility and rich snippets.
- Adds Organization schema
- Includes social media profiles
- Improves local SEO signals
Performance Optimizations
perf(assets): implement lazy loading for images
Reduces initial page load time by implementing
lazy loading for below-the-fold images.
- Adds intersection observer for images
- Reduces initial payload by ~40%
- Improves Core Web Vitals scores
Style Updates
style(pricing): improve mobile responsive design
Enhances pricing cards layout for better mobile
user experience.
- Adjusts card spacing on small screens
- Improves button tap targets
- Fixes text overflow issues
Setup
Install Dependencies
npm install
Setup Git Hooks
npm run setup:hooks
This will install the commit-msg hook that validates your commit messages locally before they’re pushed.
Using Commitizen (Optional)
For interactive commit message creation:
npm run commit
Release Notes
The automatic release notes will group changes by type:
## What's Changed
### 🚀 Features
- feat(landing): add animated hero section
- feat(seo): add structured data for organization
### 🐛 Bug Fixes
- fix(pricing): correct pricing calculation display
- fix(nav): resolve mobile menu toggle issue
### 📚 Documentation
- docs: add setup instructions for local development
### 🔧 Maintenance
- chore(deps): update Jekyll to 4.3.0
Resources
Questions?
If you’re unsure about how to format a commit message, check:
- Recent commits in the repository for examples
- This guide for the appropriate type and format
- Open an issue for guidance
Remember: It’s better to ask than to break the versioning! 🚀