Skip to content
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
65 changes: 53 additions & 12 deletions .cursor/rules/api-documentation.mdc
Original file line number Diff line number Diff line change
@@ -1,21 +1,62 @@
---
description: Standards for OpenAPI specifications and API code samples
description: Cursor-specific rules for OpenAPI specifications and API documentation
globs: ["apify-api/**/*.yaml", "apify-api/**/*.js"]
alwaysApply: true
---

# API Documentation Rules
# Cursor-Specific API Documentation Rules

## OpenAPI specifications
## Cursor OpenAPI Workflow

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

## Code samples
- Leverage Cursor's YAML syntax highlighting for OpenAPI files
- Use Cursor's JSON schema validation for OpenAPI specifications
- Use Cursor's autocomplete for OpenAPI keywords and properties

- Include examples in **multiple languages** (JavaScript, Python, cURL)
- Use **realistic data** in examples
- Show **error handling** where appropriate
- Include **authentication examples**
### Cursor-Specific API Documentation Tasks

- Use Cursor Chat to "validate this OpenAPI specification"
- Ask "generate code examples for this endpoint"
- Request "check for consistency across similar endpoints"

## Cursor Code Sample Generation

### Using Cmd+K for API References

- Use `@apify-api/openapi/paths/**/*.yaml` to reference endpoint definitions
- Use `@apify-api/openapi/components/schemas/**/*.yaml` to reference data models
- Use `@AGENTS.md` to reference API documentation standards

### Cursor-Specific Code Sample Workflow

```yaml
# When editing OpenAPI files in Cursor:
# 1. Use Cursor's YAML validation
# 2. Leverage autocomplete for OpenAPI keywords
# 3. Use Cursor Chat to generate examples
# 4. Use Cursor's search to find similar patterns
```

## File-Specific Cursor Rules

### For OpenAPI Specification Files (`apify-api/openapi/**/*.yaml`)

- Use Cursor's YAML syntax highlighting and validation
- Leverage Cursor's autocomplete for OpenAPI 3.0 keywords
- Use Cursor's search to find similar endpoint patterns
- Use Cursor Chat to validate OpenAPI compliance

### For Generated Code Samples (`apify-api/openapi/code_samples/**/*.js`)

- Use Cursor's JavaScript syntax highlighting
- Leverage Cursor's autocomplete for JavaScript APIs
- Use Cursor's search to find similar code patterns
- Use Cursor Chat to improve code examples

## Cursor Quality Assurance for APIs

- Use Cursor's YAML validation for OpenAPI files
- Leverage Cursor's search to ensure endpoint naming consistency
- Use Cursor Chat to review API documentation completeness
- Use Cursor's autocomplete to maintain OpenAPI specification standards
90 changes: 57 additions & 33 deletions .cursor/rules/content-formatting.mdc
Original file line number Diff line number Diff line change
@@ -1,58 +1,82 @@
---
description: Content formatting standards for MDX files and code examples
description: Cursor-specific content formatting rules for MDX and markdown files
globs: ["sources/**/*.md", "sources/**/*.mdx"]
alwaysApply: true
---

# Content Formatting Rules
# Cursor-Specific Content Formatting

## Front matter (MDX files)
## Cursor MDX/Markdown Features

### Syntax Highlighting in Cursor

- Use language-specific code blocks for proper syntax highlighting
- Leverage Cursor's MDX component autocomplete
- Use Cursor's markdown preview for real-time formatting verification

### Cursor-Specific Code Block Handling

```markdown
# For JavaScript examples
```javascript
// Cursor will provide syntax highlighting and autocomplete
const example = "properly formatted";
```

# For YAML frontmatter

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

## Text emphasis
# For API examples

- **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
```bash
curl -X GET "https://api.apify.com/v2/acts"
```

## Admonitions

Use admonitions to highlight important information:
## Cursor Workflow for Formatting

```markdown
:::note Important information
Your note content here.
:::
### Using Cursor Chat for Formatting Help

:::tip Pro tip
Helpful tip for users.
:::
- Ask "format this markdown table properly"
- Request "add syntax highlighting to this code block"
- Use "check this frontmatter for proper YAML syntax"

:::info Additional context
Background information.
:::
### Using Cmd+K for Quick Formatting

- Use `@` to reference formatting standards
- Use `@sources/**/*.mdx` to find similar MDX patterns
- Use `@apify-api/**/*.yaml` to reference API examples

## Cursor-Specific Admonition Handling

When using admonitions in Cursor:

:::caution Warning
Something to be careful about.
```markdown
:::note Cursor Tip
Use Cursor's markdown preview to verify admonition formatting
:::

:::danger Critical
Critical information that could cause issues.
:::tip Cursor Feature
Leverage Cursor's autocomplete for consistent admonition syntax
:::
```

## Code examples
## File-Specific Formatting Rules

### For MDX Files (`sources/**/*.mdx`)

- Use Cursor's MDX syntax highlighting
- Leverage component imports with proper TypeScript support
- Use Cursor's JSX autocomplete for custom components

### For Markdown Files (`sources/**/*.md`)

- Use **code tabs** for multiple language examples
- Include **complete, runnable examples**
- Add **comments** to explain complex code
- Use **syntax highlighting** for all code blocks
- Use Cursor's markdown preview for formatting verification
- Leverage Cursor's spell check for content quality
- Use Cursor's link validation for internal references
92 changes: 33 additions & 59 deletions .cursor/rules/documentation-style.mdc
Original file line number Diff line number Diff line change
@@ -1,81 +1,55 @@
---
description: Documentation style guidelines and writing standards for Apify docs
description: Cursor-specific documentation style rules for Apify docs
globs: ["sources/**/*.md", "sources/**/*.mdx"]
alwaysApply: true
---

# Documentation Style Guidelines
# Cursor-Specific Documentation Rules

## Project overview
## Context-Aware Writing

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.
When editing documentation in Cursor, consider the broader context:

## Documentation structure
- **Cross-references**: When mentioning other pages, use Cursor's file navigation to verify links
- **Consistency checks**: Use Cursor's search to ensure terminology consistency across files
- **Code examples**: Leverage Cursor's syntax highlighting and validation for code blocks

- **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
## Cursor-Specific Workflows

## Writing style & guidelines
### Using Cursor Chat for Documentation

### Language & tone
- Ask Cursor to "review this documentation for clarity and completeness"
- Use "explain this technical concept in simpler terms" for complex topics
- Request "suggest improvements for this tutorial structure"

- 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
### Using Cmd+K for Quick Edits

### Technical writing best practices
- Use `@AGENTS.md` to reference the main documentation standards
- Use `@sources/**/*.md` to search across all documentation files
- Use `@apify-api/**/*.yaml` to reference API specifications

- **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
## File-Specific Guidance

### Microsoft style guide compliance
### For Platform Documentation (`sources/platform/**/*.md`)

- 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
- Focus on practical, actionable guidance
- Include real-world examples and use cases
- Reference related API endpoints when applicable

## Common patterns
### For Academy Content (`sources/academy/**/*.md`)

### Tutorial structure
- Structure content for learning progression
- Include hands-on exercises and examples
- Provide clear prerequisites and next steps

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
### For MDX Files

### Troubleshooting sections
- Leverage Cursor's MDX syntax highlighting
- Use component imports and JSX syntax appropriately
- Ensure proper frontmatter formatting

- **Common issues** and solutions
- **Error messages** and their meanings
- **Debugging steps** for complex problems
- **Contact information** for additional help
## Quality Assurance in Cursor

## 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.
- Use Cursor's spell check for documentation files
- Leverage Cursor's markdown preview for formatting verification
- Use Cursor's search to find similar content and maintain consistency
78 changes: 78 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Dependencies
node_modules/
package-lock.json
yarn.lock
apify-docs-theme/package-lock.json

# Build artifacts and generated content
build/
dist/
build-docs/
.docusaurus/
static/api/
apify-api.yaml
apify-api/openapi/code_samples/
apify-api/docs/

# Large generated files
*.log
*.pid
*.seed
*.tsbuildinfo

# IDE and editor files
.vscode/
.idea/
.history/

# OS files
.DS_Store
Thumbs.db

# Temporary files
tmp/
pids/
coverage/
.nyc_output/

# Generated types
types/

# Turbo cache
.turbo/

# Generated documentation
# These are typically auto-generated, but require editing from time to time
# sources/api/*
# !sources/api/sidebars.js
# !sources/api/getting-started.mdx

# Large static files that are auto-generated
static/api/openapi.json
static/api/openapi.yaml

# Generated routes and registry files
.docusaurus/routes.js
.docusaurus/routesChunkNames.json
.docusaurus/registry.js
.docusaurus/globalData.json
.docusaurus/site-metadata.json
.docusaurus/client-modules.js
.docusaurus/docusaurus.config.mjs

# Generated plugin directories
.docusaurus/docusaurus-plugin-*/
.docusaurus/docusaurus-theme-*/
.docusaurus/@apify/

# Generated code samples (these are auto-generated from OpenAPI specs)
# Note: These are typically auto-generated, but you may need to edit them occasionally
# Uncomment the lines below if you want to ignore them completely:
# apify-api/openapi/code_samples/javascript/*.js
# apify-api/openapi/code_samples/curl/*.sh

# Generated requirements files
apify-api/scripts/requirements.bin

# AGENTS.md is the primary vendor-agnostic rules file
# .cursor/rules/ contains Cursor-specific rules with advanced features
2 changes: 2 additions & 0 deletions .github/styles/config/vocabularies/Docs/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ preconfigured
[Tt]rello
[Pp]refill
[Gg]umloop
[Rr]edocly
[Aa]pify

[Mm]ultiselect
Expand Down Expand Up @@ -122,3 +123,4 @@ walkthroughs?

ul
[Aa]gno
pnpm
Loading