Cursor rule
.cursor/rules/docs_development.mdcGuidelines for developing and maintaining Langflow documentation using Docusaurus, including content structure, style, and deployment processes.
Cursor rules
Quality
97/100
Scores the file, not the repository.Length
878 words
33 headings · 12 code blocksRepository
153k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.12345678910111213# Documentation Development Guidelines1415## Purpose16Guidelines for developing and maintaining Langflow documentation using Docusaurus, including content structure, style, and deployment processes.1718---1920## 1. Documentation Environment Setup2122### Prerequisites23- **Node.js:** v22.12 LTS for runtime24- **Package Manager:** npm for dependency management25- **Documentation Framework:** Docusaurus v32627### Documentation Service28```bash29cd docs30npm install # Install dependencies31npm run start # Start dev server32```33- Auto-reloads on documentation changes34- Access at: http://localhost:3000/35- Documentation source: `docs/`3637---3839## 2. Documentation Structure4041### Directory Layout42```43docs/44├── docs/ # Main documentation content45│ ├── agents/ # Agent and MCP guides46│ ├── get-started/ # Getting started guides47│ ├── tutorials/ # Langflow tutorials48│ ├── components/ # Component documentation49│ ├── flows/ # Guides to build, run, and test flows50│ ├── deployment/ # Guides for deploying and hosting a Langflow server51│ ├── develop/ # Guides for developing apps with Langflow52│ ├── support/ # Help and release notes53│ ├── contributing/ # Contribution guidelines54│ ├── api-reference/ # API documentation55│ └── _partial-*.mdx # Shared content partials (imported by other pages)56├── src/ # Custom React components57├── static/ # Static assets (images, etc.)58├── sidebars.js # Sidebar configuration59├── docusaurus.config.js # Main configuration60└── package.json # Dependencies61```6263---6465## 3. Writing Documentation6667### Frontmatter68Every `.mdx` file uses only `title` and `slug`. No `description` or `sidebar_position`.6970```71---72title: Page Title73slug: /page-slug74---75```7677The `title` value is used as the page heading — do not add a duplicate `# h1` after the frontmatter.7879### MDX Imports80Most pages import one or more of these at the top, after frontmatter:8182```83import Icon from "@site/src/components/icon";84import Tabs from '@theme/Tabs';85import TabItem from '@theme/TabItem';86import SomePartial from '@site/docs/_partial-some-content.mdx';87```8889- Use `<Icon name="IconName" aria-hidden="true" />` to reference Lucide icons inline. Always include `aria-hidden="true"` and bold the button name next to it for accessibility: `<Icon name="Play" aria-hidden="true" /> **Run**`.90- Use `<SomePartial />` to embed shared content partials.9192### Admonitions93```94:::tip95Use for helpful tips.96:::9798:::warning99Use for potential issues.100:::101102:::danger103Use for critical warnings.104:::105```106107### Images and Assets108```109110```111112Images go in `static/img/`. Use descriptive alt text.113114---115116## 4. Component Documentation117118### Component Page Template119```120---121title: Component Name122slug: /component-name123---124125import Icon from "@site/src/components/icon";126127One-sentence description of what the component does.128129## Use the Component Name component in a flow130131Step-by-step instructions for using the component.132133## Component Name parameters134135| Name | Type | Description |136|------|------|-------------|137| `input_name` | MessageTextInput | Description of the input. |138| `output_name` | Message | Description of the output. |139```140141### API Documentation142```143---144title: API Endpoint Name145slug: /api-endpoint-name146---147148## Endpoint149150`POST /api/v1/endpoint`151152## Request body153154| Parameter | Type | Description |155|-----------|------|-------------|156| `param` | string | Description. |157158## Example159160```bash161curl -X POST http://localhost:7860/api/v1/endpoint \162 -H "Authorization: Bearer your-token" \163 -H "Content-Type: application/json" \164 -d '{"param": "value"}'165```166```167168---169170## 5. Documentation Testing171172### Build and serve173```bash174cd docs175npm run build # Build static site176npm run serve # Serve built site locally177```178179### API examples180```bash181make api_examples_local # Run API sample files against a local Langflow server182make api_examples_local_syntax # Syntax-check API sample files without executing them183```184185### Content Review186- **Accuracy:** Verify all code examples work187- **Completeness:** Ensure all features are documented188- **Clarity:** Review for clear, concise language189- **Navigation:** Test sidebar and cross-references190191### Screenshots192- Keep screenshots up-to-date with current UI193- Use consistent browser/OS for screenshots194- Highlight relevant UI elements195- Use descriptive file names196197---198199## 6. Style Guide200201### Writing Style202- **Tone:** Professional but approachable203- **Voice:** Second person ("you") for instructions204- **Tense:** Present tense for current features205- **Length:** Keep paragraphs short and scannable206207### Formatting208- **Headers:** Use sentence case209- **Code:** Inline code with `backticks`210- **Emphasis:** Use **bold** for UI elements, *italic* for emphasis211- **Lists:** Use parallel structure212213### Terminology214- **Langflow:** Always capitalize215- **Component:** Capitalize when referring to Langflow components216- **Flow:** Capitalize when referring to Langflow flows217- **API:** Always uppercase218- **JSON:** Always uppercase219220---221222## 7. Deployment223224### Local Testing225```bash226cd docs227npm run build # Build static site228npm run serve # Serve built site locally229```230231### Production Deployment232- Documentation changes are submitted as pull requests to the **release branch**, not directly to `main`.233- The release branch is merged to `main` as part of the release process.234- Build artifacts go to the `build/` directory.235- The static site is served via CDN.236237---238239## Documentation Development Checklist240- [ ] Documentation service running with `npm run start`241- [ ] Content follows markdown conventions242- [ ] Code examples are tested and working243- [ ] Images have descriptive alt text244- [ ] Internal links are functional245- [ ] Sidebar navigation is updated246- [ ] Content follows style guide247- [ ] Screenshots are current and properly formatted248- [ ] Cross-references between related topics249- [ ] Build succeeds with `npm run build`250- [ ] Changes target the release branch (not `main`)251
Also in langflow-ai/langflow
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| langflow-ai/langflowAGENTS.md · 153k | AGENTS.md | setuptestlint-formatstyle+10 | 89/100 | 3 days ago | |
| langflow-ai/langflowCLAUDE.md · 153k | CLAUDE.md | agent-behaviour | 16/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/gh-task-plan.mdc · 1.4k | Cursor rules | teststylearchtypes+2 | 96/100 | 3 days ago |
