Skip to content

Commit c9f0b89

Browse files
committed
docs: add cursorrules
1 parent ce28e77 commit c9f0b89

File tree

1 file changed

+232
-0
lines changed

1 file changed

+232
-0
lines changed

.cursorrules

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
# Apify documentation - cursor rules
2+
3+
## Project overview
4+
5+
This is the Apify documentation repository containing platform documentation, academy content, and API reference. The project uses Docusaurus with MDX, OpenAPI specifications, and follows Microsoft style guide principles.
6+
7+
## Documentation structure
8+
9+
- **Platform docs**: `/sources/platform/` - Core platform features and functionality
10+
- **Academy**: `/sources/academy/` - Educational content, tutorials, and courses
11+
- **API reference**: `/apify-api/` - Generated from OpenAPI specifications
12+
13+
## Writing style & guidelines
14+
15+
### Language & tone
16+
17+
- Use **US English** spelling and grammar
18+
- Write in **inclusive language** - avoid gendered terms and assumptions
19+
- Use **active voice** whenever possible
20+
- Write for a **technical audience** but keep explanations clear and accessible
21+
- Avoid directional language (don't use "left/right")
22+
- Be **action-oriented** in descriptions and titles
23+
24+
### Technical writing best practices
25+
26+
- **Start with the user's goal** - what are they trying to accomplish?
27+
- **Use clear, concise sentences** - avoid unnecessary complexity
28+
- **Provide context** before diving into technical details
29+
- **Use consistent terminology** throughout the documentation
30+
- **Include examples** for complex concepts
31+
- **Structure content logically** - from basic to advanced concepts
32+
33+
### Microsoft style guide compliance
34+
35+
- Use **sentence case** for headings (except main titles)
36+
- Use **title case** for UI elements and proper nouns
37+
- **Bold** for UI elements, buttons, menu items
38+
- *Italics* for emphasis and new terms
39+
- `code` for inline code, file names, and technical terms
40+
- Use **numbered lists** for sequential steps
41+
- Use **bullet points** for non-sequential items
42+
43+
## Content formatting
44+
45+
### Front matter (MDX files)
46+
47+
```yaml
48+
---
49+
title: "Clear, action-oriented title"
50+
description: "140-160 character description that explains the value"
51+
sidebar_position: 1
52+
slug: /path/to/page
53+
---
54+
```
55+
56+
### Text emphasis
57+
58+
- **Bold** for UI elements, buttons, menu items
59+
- *Italics* for emphasis and new terms
60+
- `code` for inline code, file names, paths, variables
61+
- Use code blocks with language specification for examples
62+
63+
### Admonitions
64+
65+
Use admonitions to highlight important information:
66+
67+
```markdown
68+
:::note Important information
69+
Your note content here.
70+
:::
71+
72+
:::tip Pro tip
73+
Helpful tip for users.
74+
:::
75+
76+
:::info Additional context
77+
Background information.
78+
:::
79+
80+
:::caution Warning
81+
Something to be careful about.
82+
:::
83+
84+
:::danger Critical
85+
Critical information that could cause issues.
86+
:::
87+
```
88+
89+
### Code examples
90+
91+
- Use **code tabs** for multiple language examples
92+
- Include **complete, runnable examples**
93+
- Add **comments** to explain complex code
94+
- Use **syntax highlighting** for all code blocks
95+
96+
### Screenshots & images
97+
98+
- Use **light theme** for screenshots
99+
- Include **meaningful alt text**
100+
- Use **red indicators** to highlight important areas
101+
- Keep images **optimized** for web
102+
103+
## File organization
104+
105+
### Naming conventions
106+
107+
- Use **kebab-case** for file names: `web-scraping-basics.md`
108+
- Use **descriptive names** that reflect content
109+
- Group related files in **logical directories**
110+
111+
### Directory structure
112+
113+
```text
114+
sources/
115+
├── platform/ # Platform documentation
116+
│ ├── actors/ # Actor-related content
117+
│ ├── storage/ # Storage documentation
118+
│ └── integrations/ # Integration guides
119+
└── academy/ # Educational content
120+
├── tutorials/ # Step-by-step guides
121+
├── webscraping/ # Web scraping courses
122+
└── glossary/ # Terminology and definitions
123+
```
124+
125+
## API documentation
126+
127+
### OpenAPI specifications
128+
129+
- Follow **RESTful conventions** for endpoint design
130+
- Use **descriptive operation IDs** following camelCase
131+
- Include **comprehensive examples** for all endpoints
132+
- Provide **clear parameter descriptions**
133+
134+
### Code samples
135+
136+
- Include examples in **multiple languages** (JavaScript, Python, cURL)
137+
- Use **realistic data** in examples
138+
- Show **error handling** where appropriate
139+
- Include **authentication examples**
140+
141+
## Quality standards
142+
143+
### Content review checklist
144+
145+
- [ ] Content follows Microsoft style guide
146+
- [ ] All links are working and accurate
147+
- [ ] Code examples are tested and functional
148+
- [ ] Screenshots are up-to-date and clear
149+
- [ ] Front matter includes proper metadata
150+
- [ ] Content is accessible and inclusive
151+
152+
### Technical accuracy
153+
154+
- Verify all **technical information** is current
155+
- Test **code examples** before publishing
156+
- Ensure **screenshots** match current UI
157+
- Validate **API endpoints** and responses
158+
159+
## Development workflow
160+
161+
### Local development
162+
163+
1. Run `npm install` to install dependencies
164+
2. Use `npm start` for basic development
165+
3. Use `npm start:dev` for full documentation set
166+
4. Run `npm run lint:md` to check markdown
167+
5. Run `npm run lint:code` to check code
168+
169+
### Linting & quality
170+
171+
- **Markdown linting**: `npm run lint:md`
172+
- **Code linting**: `npm run lint:code`
173+
- **Prose linting**: Uses Vale with Microsoft style guide
174+
- **Auto-fix**: `npm run lint:fix`
175+
176+
### Commit guidelines
177+
178+
- Follow **Conventional Commits** format
179+
- Include **comprehensive documentation updates**
180+
- Ensure all **CI checks pass**
181+
182+
## Common patterns
183+
184+
### Tutorial structure
185+
186+
1. **Introduction** - What will the user learn?
187+
2. **Prerequisites** - What do they need to know/have?
188+
3. **Step-by-step instructions** - Clear, numbered steps
189+
4. **Code examples** - Complete, working examples
190+
5. **Summary** - What they accomplished and next steps
191+
192+
### API documentation structure
193+
194+
1. **Overview** - What the endpoint does
195+
2. **Authentication** - How to authenticate
196+
3. **Parameters** - Detailed parameter descriptions
197+
4. **Request examples** - Multiple language examples
198+
5. **Response examples** - Success and error responses
199+
6. **Rate limits** - Any applicable limits
200+
201+
### Troubleshooting sections
202+
203+
- **Common issues** and solutions
204+
- **Error messages** and their meanings
205+
- **Debugging steps** for complex problems
206+
- **Contact information** for additional help
207+
208+
## Accessibility guidelines
209+
210+
- Use **descriptive link text** (avoid "click here")
211+
- Include **alt text** for all images
212+
- Use **proper heading hierarchy** (H1 → H2 → H3)
213+
- Ensure **sufficient color contrast**
214+
- Write **clear, concise content**
215+
216+
## SEO best practices
217+
218+
- Use **descriptive page titles**
219+
- Include **relevant keywords** naturally
220+
- Write **meta descriptions** (140-160 characters)
221+
- Use **proper heading structure**
222+
- Include **internal links** to related content
223+
224+
## Review process
225+
226+
1. **Self-review** using the quality checklist
227+
2. **Technical review** by subject matter experts
228+
3. **Editorial review** for style and clarity
229+
4. **Accessibility review** for inclusive content
230+
5. **Final review** before publication
231+
232+
Remember: The goal is to help users succeed with Apify. Every piece of documentation should serve that purpose by being clear, accurate, and actionable.

0 commit comments

Comments
 (0)