Contributing Guide
Thank you for considering contributing to Rspress Theme AIm!
📋 Table of Contents
- Code of Conduct
- How to Contribute
- Development Process
- Commit Guidelines
- Code Standards
- Documentation Standards
Code of Conduct
Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
Our Standards
Positive behavior includes:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Unacceptable behavior includes:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
How to Contribute
Reporting Bugs
Before submitting a bug report, please:
- Check the Issues to see if the problem has already been reported
- Confirm you are using the latest version
- Read the relevant documentation to confirm it's not a usage issue
When submitting a bug report, please include:
- Clear title and description
- Steps to reproduce - Detailed steps for us to reproduce the problem
- Expected behavior - What you expected to happen
- Actual behavior - What actually happened
- Environment information - OS, browser version, Node.js version, etc.
- Screenshots - If applicable, add screenshots to help explain the problem
- Code example - Provide a minimal reproducible code example
Bug Report Template
Suggesting New Features
We welcome new feature suggestions! Please describe in detail in an Issue:
- Feature description - Clearly describe the feature you want
- Use case - Why this feature is needed
- Implementation suggestions - If you have ideas, provide implementation suggestions
- Alternatives - Other alternatives you've considered
Feature Request Template
Improving Documentation
Documentation improvements include:
- Fixing spelling or grammar errors
- Adding missing documentation
- Improving clarity of existing documentation
- Adding more examples
- Translating documentation
Development Process
1. Fork and Clone the Repository
2. Create a Branch
Branch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation improvementsrefactor/- Code refactoringtest/- Test relatedchore/- Other miscellaneous
3. Make Your Changes
4. Test Your Changes
Ensure:
- ✅ Code compiles correctly (
pnpm build) - ✅ Local preview works (
pnpm preview) - ✅ Multi-language functionality works (Chinese/English)
- ✅ Documentation is complete
5. Commit Your Changes
6. Push and Create PR
Then create a Pull Request on GitHub.
Commit Guidelines
We use the Conventional Commits specification.
Commit Message Format
Type
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes that don't affect functionalityrefactor- Code refactoringperf- Performance improvementstest- Adding or modifying testschore- Build process or auxiliary tool changesci- CI configuration changesrevert- Revert previous commit
Scope (Optional)
blog- Blog feature relatedcopyright- Copyright information relatedicp- ICP filing relatedgongan- Public security filing relatednav- Navigation relatedconfig- Configuration relateddeps- Dependencies related
Examples
Code Standards
TypeScript
- Write code in TypeScript
- Add type annotations to all functions
- Avoid using
anytype - Use interfaces to define data structures
React
- Use functional components and Hooks
- Use PascalCase for component naming
- Use
handleprefix for event handlers - Use interfaces to define Props
Code Style
- Use 2 space indentation
- Use single quotes
- No semicolons at end of statements
- Maximum line length 100 characters
File Naming
- Component files: PascalCase (e.g.,
CopyrightFooter.tsx) - Utility files: kebab-case (e.g.,
format-date.ts) - Style files: kebab-case (e.g.,
blog.css)
Documentation Standards
Markdown Documents
- Use both Chinese and English
- Add
orderfrontmatter at the beginning of documents - Clear heading hierarchy (H1 > H2 > H3)
- Specify language type for code blocks
- Use relative paths for internal document links
Document Structure
Multi-language Documentation
- Chinese documents in
docs/zh/ - English documents in
docs/en/ - Keep Chinese and English document structure consistent
- Use the same
ordervalue
Pull Request Guidelines
PR Title
Follow commit guidelines:
PR Description Template
PR Review Process
- Automated checks - CI automatically runs build tests
- Code review - Maintainers will review your code
- Feedback changes - Make necessary changes based on feedback
- Merge - After approval, merge to main branch
Getting Help
If you encounter problems while contributing:
- 📖 Check the Documentation
- 💬 Ask in Discussions
- 🐛 Search or ask in Issues
License
By contributing code, you agree that your contributions will be licensed under the project's MIT License.
Thank you again for your contribution! 🎉