| name | writing-cookbook-recipe |
| version | 1.0 |
| description | Use when writing a new cookbook recipe for the RAPS website — covers the MDX frontmatter format, section structure, category taxonomy, and Tailwind styling patterns for workflow visualizations. |
Writing a Cookbook Recipe
Create step-by-step workflow recipes for the RAPS documentation website.
Repo: /root/github/raps/raps-website
Location: src/content/cookbook/en/<slug>.mdx
Frontmatter
---
title: "Recipe Title"
description: "What this recipe automates"
category: "construction"
order: 40
icon: "📋"
---
Categories
| Category | Scope | Examples |
|---|
aec | Architecture, Engineering, Construction | IFC workflows, coordination, metadata |
construction | ACC/BIM 360 | Admin, issues, RFIs, checklists, submittals |
manufacturing | Manufacturing Cloud | BOMs, drawings, catalogs |
media | Media & Entertainment | Animation, materials, photogrammetry |
Content Structure
- H1 Title — same as frontmatter title
- Intro paragraph — what the recipe does and why
- Workflow Overview — visual diagram using Tailwind divs
- CLI Approach — bash code blocks with real
raps commands
- Pipeline Automation — YAML pipeline example
- CI/CD Integration — GitHub Actions workflow example
- Troubleshooting — common errors and fixes
- Related — links to other recipes and docs
Workflow Overview Visual Pattern
<div className="not-prose mb-8">
<div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
<div className="bg-blue-900/20 border border-blue-700/50 rounded-lg p-4 text-center">
<div className="text-2xl mb-2">Upload</div>
<div className="font-semibold">Upload</div>
<div className="text-sm text-gray-400">Send models to OSS</div>
</div>
<div className="text-2xl">-></div>
<div className="bg-purple-900/20 border border-purple-700/50 rounded-lg p-4 text-center">
<div className="text-2xl mb-2">Translate</div>
<div className="font-semibold">Translate</div>
<div className="text-sm text-gray-400">Convert to SVF2</div>
</div>
</div>
</div>
Code Block Pattern
```bash
# Upload model to OSS
raps object upload my-bucket model.rvt
# Start translation
URN=$(raps object urn my-bucket model.rvt)
raps translate start "$URN" --format svf2 --wait
```
i18n
Create parallel file in src/content/cookbook/uk/<same-slug>.mdx with translated frontmatter. Content can remain in English as fallback.
Checklist
- Create
src/content/cookbook/en/<slug>.mdx with frontmatter
- Write sections: overview, CLI, pipeline, CI/CD, troubleshooting, related
- Use
className not class in JSX divs
- Create Ukrainian stub in
uk/
- Run
npm run build to verify
- Commit and push