Thank you for your interest in contributing to StructPages!
- Go 1.24.3 or later
- Templ CLI for working with examples
To ensure code quality and consistency, set up pre-commit hooks for automatic code formatting and linting:
./scripts/setup-hooks.shThis will configure git to run goimports, gofmt, and golangci-lint before each commit.
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with verbose output
go test -v ./...
# Run a specific test
go test -run TestName ./...# Navigate to an example
cd examples/simple # or examples/htmx or examples/todo
# Install dependencies
go mod download
# Generate Go code from Templ files (required before running)
templ generate -include-version=false
# Run the example server (typically on :8080)
go run main.go
# Watch mode for Templ files during development
templ generate --watch- Follow standard Go conventions and idioms
- Write tests for new functionality
- Update documentation when adding features
- Keep commits focused and atomic
- Write clear commit messages
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and ensure they pass
- Commit your changes (pre-commit hooks will run automatically)
- Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
Feel free to open an issue on GitHub if you have questions or run into problems.