Skip to content

docs: add cursor rules #1791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .cursor/rules/api-documentation.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description: Standards for OpenAPI specifications and API code samples
globs: ["apify-api/**/*.yaml", "apify-api/**/*.js"]
alwaysApply: true
---

# API Documentation Rules

## OpenAPI specifications

- Follow **RESTful conventions** for endpoint design
- Use **descriptive operation IDs** following camelCase
- Include **comprehensive examples** for all endpoints
- Provide **clear parameter descriptions**

## Code samples

- Include examples in **multiple languages** (JavaScript, Python, cURL)
- Use **realistic data** in examples
- Show **error handling** where appropriate
- Include **authentication examples**
58 changes: 58 additions & 0 deletions .cursor/rules/content-formatting.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
description: Content formatting standards for MDX files and code examples
globs: ["sources/**/*.md", "sources/**/*.mdx"]
alwaysApply: true
---

# Content Formatting Rules

## Front matter (MDX files)

```yaml
---
title: "Clear, action-oriented title"
description: "140-160 character description that explains the value"
sidebar_position: 1
slug: /path/to/page
---
```

## Text emphasis

- **Bold** for UI elements, buttons, menu items
- *Italics* for emphasis and new terms
- `code` for inline code, file names, paths, variables
- Use code blocks with language specification for examples

## Admonitions

Use admonitions to highlight important information:

```markdown
:::note Important information
Your note content here.
:::

:::tip Pro tip
Helpful tip for users.
:::

:::info Additional context
Background information.
:::

:::caution Warning
Something to be careful about.
:::

:::danger Critical
Critical information that could cause issues.
:::
```

## Code examples

- Use **code tabs** for multiple language examples
- Include **complete, runnable examples**
- Add **comments** to explain complex code
- Use **syntax highlighting** for all code blocks
81 changes: 81 additions & 0 deletions .cursor/rules/documentation-style.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
description: Documentation style guidelines and writing standards for Apify docs
globs: ["sources/**/*.md", "sources/**/*.mdx"]
alwaysApply: true
---

# Documentation Style Guidelines

## Project overview

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.

## Documentation structure

- **Platform docs**: `/sources/platform/` - Core platform features and functionality
- **Academy**: `/sources/academy/` - Educational content, tutorials, and courses
- **API reference**: `/apify-api/` - Generated from OpenAPI specifications

## Writing style & guidelines

### Language & tone

- Use **US English** spelling and grammar
- Write in **inclusive language** - avoid gendered terms and assumptions
- Use **active voice** whenever possible
- Write for a **technical audience** but keep explanations clear and accessible
- Avoid directional language (don't use "left/right")
- Be **action-oriented** in descriptions and titles

### Technical writing best practices

- **Start with the user's goal** - what are they trying to accomplish?
- **Use clear, concise sentences** - avoid unnecessary complexity
- **Provide context** before diving into technical details
- **Use consistent terminology** throughout the documentation
- **Include examples** for complex concepts
- **Structure content logically** - from basic to advanced concepts

### Microsoft style guide compliance

- Use **sentence case** for headings (except main titles)
- Use **title case** for UI elements and proper nouns
- **Bold** for UI elements, buttons, menu items
- _Italics_ for emphasis and new terms
- `code` for inline code, file names, and technical terms
- Use **numbered lists** for sequential steps
- Use **bullet points** for non-sequential items

## Common patterns

### Tutorial structure

1. **Introduction** - What will the user learn?
2. **Prerequisites** - What do they need to know/have?
3. **Step-by-step instructions** - Clear, numbered steps
4. **Code examples** - Complete, working examples
5. **Summary** - What they accomplished and next steps

### Troubleshooting sections

- **Common issues** and solutions
- **Error messages** and their meanings
- **Debugging steps** for complex problems
- **Contact information** for additional help

## Accessibility guidelines

- Use **descriptive link text** (avoid "click here")
- Include **alt text** for all images
- Use **proper heading hierarchy** (H1 → H2 → H3)
- Write **clear, concise content**

## SEO best practices

- Use **descriptive page titles**
- Include **relevant keywords** naturally
- Write **meta descriptions** (140-160 characters)
- Use **proper heading structure**
- Include **internal links** to related content

Remember: The goal is to help users succeed with Apify. Every piece of documentation should serve that purpose by being clear, accurate, and actionable.
27 changes: 27 additions & 0 deletions .cursor/rules/file-organization.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: File naming conventions and directory structure standards
globs: ["sources/**/*"]
alwaysApply: true
---

# File Organization Rules

## Naming conventions

- Use **kebab-case** for file names: `web-scraping-basics.md`
- Use **descriptive names** that reflect content
- Group related files in **logical directories**

## Directory structure

```text
sources/
├── platform/ # Platform documentation
│ ├── actors/ # Actor-related content
│ ├── storage/ # Storage documentation
│ └── integrations/ # Integration guides
└── academy/ # Educational content
├── tutorials/ # Step-by-step guides
├── webscraping/ # Web scraping courses
└── glossary/ # Terminology and definitions
```
20 changes: 20 additions & 0 deletions .cursor/rules/quality-standards.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
description: Content quality checklist and review standards
globs: ["sources/**/*.md", "sources/**/*.mdx"]
alwaysApply: true
---

# Quality Standards

## Content quality guidelines

When creating or editing content, ensure:

- [ ] Content follows Microsoft style guide (sentence case headings, proper emphasis)
- [ ] Front matter includes proper title, description, and metadata
- [ ] Code examples are complete and include proper syntax highlighting
- [ ] All links use descriptive text (avoid "click here")
- [ ] Images include meaningful alt text
- [ ] Content uses inclusive language and active voice
- [ ] Headings follow proper hierarchy (H1 → H2 → H3)
- [ ] Content is clear, concise, and action-oriented