Documentation Writing Guide
Documentation Structure Standards
1. Component Documentation Structure
Each component documentation should include the following content:
Advanced Usage
More usage examples...
API
Design Guidelines
Design principles and usage recommendations for the component.
2. Example File Location
Example code should be placed in the demos/ directory, organized by component:
Content Writing Guidelines
1. Heading Hierarchy
- Use
#for page main titles - Use
##for main chapter titles - Use
###for sub-chapter titles - Avoid using more than 4 levels of headings
2. Code Blocks
- Use ```tsx for TypeScript React code
- Use ```bash for command line code
- Use ```json for JSON data
3. Links and References
- Use relative paths for internal links:
/components/card - Use complete URLs for external links
- Use Markdown link syntax when referencing other documentation
4. Images and Resources
- Place images in the
public/directory - Use relative paths for references:
/images/example.png - Add alt attributes to images
Maintenance Guidelines
1. Regular Updates
- Synchronize documentation updates with component updates
- Check if example code is still valid
- Update type definitions in API documentation
2. Quality Checks
- Ensure all links are valid
- Verify that example code can run normally
- Check consistency between multi-language versions
3. User Feedback
- Pay attention to user feedback on documentation
- Optimize documentation structure based on user needs
- Fix errors in documentation promptly