Skip to content

Commit 5bb1039

Browse files
milldrclaude
andauthored
docs: deprecate account-map and related components (#834)
Co-authored-by: Claude Opus 4.5 <[email protected]>
1 parent 6ac3d15 commit 5bb1039

File tree

658 files changed

+53486
-935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

658 files changed

+53486
-935
lines changed

.claude/skills/docs-build/SKILL.md

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
---
2+
name: docs-build
3+
description: Building, rendering library docs, and deploying docs.cloudposse.com. Use when working with the Docusaurus build process or regenerating auto-generated content.
4+
---
5+
6+
# Documentation Build System
7+
8+
Instructions for building and maintaining the docs.cloudposse.com site infrastructure.
9+
10+
## Local Development
11+
12+
### Quick Start
13+
14+
```bash
15+
npm install # Install dependencies (first time or after package.json changes)
16+
npm start # Start dev server at localhost:3000
17+
```
18+
19+
### Production Build
20+
21+
```bash
22+
npm run build # Build production bundle
23+
npm run serve # Serve production build locally
24+
```
25+
26+
### Cleaning
27+
28+
```bash
29+
npm run clear # Clear Docusaurus cache
30+
make real-clean # Full clean (removes node_modules, .docusaurus, build)
31+
```
32+
33+
## Linting
34+
35+
Check MDX syntax before committing:
36+
37+
```bash
38+
npx docusaurus-mdx-checker --cwd docs
39+
# or
40+
make lint
41+
```
42+
43+
Common lint errors:
44+
- Unclosed JSX tags
45+
- Invalid MDX syntax
46+
- Missing imports for components
47+
- Broken internal links
48+
49+
## Rendering Library Documentation
50+
51+
**Warning:** These scripts are slow (10+ minutes). They pull from hundreds of upstream repos. Only run when:
52+
1. Library docs don't exist locally
53+
2. Explicitly requested to update library content
54+
55+
Library docs are auto-generated in CI/CD for production deployments.
56+
57+
### Components (No Token Required)
58+
59+
```bash
60+
./scripts/render-docs-for-components.sh
61+
```
62+
63+
Pulls from `cloudposse-terraform-components/` org and renders to `docs/components/library/`.
64+
65+
### Modules (Token Required)
66+
67+
```bash
68+
PUBLIC_REPO_ACCESS_TOKEN=<github_token> ./scripts/render-docs-for-modules.sh
69+
```
70+
71+
Pulls from `cloudposse/terraform-aws-*` repos and renders to `docs/modules/library/`.
72+
73+
### GitHub Actions (Token Required)
74+
75+
```bash
76+
PUBLIC_REPO_ACCESS_TOKEN=<github_token> ./scripts/render-docs-for-github-actions.sh
77+
```
78+
79+
Pulls from `cloudposse/github-action-*` repos and renders to `docs/github-actions/library/`.
80+
81+
### Render Script Internals
82+
83+
Scripts are in `scripts/docs-collator/`:
84+
85+
```
86+
docs-collator/
87+
├── render_docs_for_components.py
88+
├── render_docs_for_modules.py
89+
├── render_docs_for_github_actions.py
90+
├── AbstractFetcher.py # Base fetcher class
91+
├── AbstractRenderer.py # Base renderer class
92+
├── GitHubProvider.py # GitHub API client
93+
├── ModuleFetcher.py # Module-specific fetcher
94+
├── ModuleRenderer.py # Module-specific renderer
95+
├── GitHubActionFetcher.py # Action-specific fetcher
96+
├── GitHubActionRenderer.py # Action-specific renderer
97+
└── templates/ # Jinja templates for rendered docs
98+
```
99+
100+
## Redirects
101+
102+
**Critical:** Broken links fail deployment.
103+
104+
### Redirect Files
105+
106+
Located in `plugins/staticRedirects/redirects/`:
107+
108+
| File | Purpose |
109+
|------|---------|
110+
| `docs.json` | General documentation moves |
111+
| `refarch.json` | Reference architecture paths |
112+
| `deprecated.json` | Deprecated content |
113+
| `legacy_setup_docs.json` | Legacy setup docs |
114+
| `components-migration.json` | Component path changes |
115+
116+
### Adding Redirects
117+
118+
```json
119+
{
120+
"from": "/old/path/",
121+
"to": "/new/path/"
122+
}
123+
```
124+
125+
Add to the appropriate JSON file based on the type of redirect.
126+
127+
## Sidebar Configuration
128+
129+
Navigation is defined in `sidebars.js`. Key patterns:
130+
131+
### Autogenerated from Directory
132+
133+
```javascript
134+
{
135+
type: 'autogenerated',
136+
dirName: 'layers/identity',
137+
}
138+
```
139+
140+
### Manual Category
141+
142+
```javascript
143+
{
144+
type: 'category',
145+
label: 'Identity',
146+
link: { type: 'doc', id: 'layers/identity/identity' },
147+
items: [
148+
'layers/identity/how-to-log-into-aws',
149+
// ...
150+
]
151+
}
152+
```
153+
154+
### Hidden from Sidebar
155+
156+
Add to frontmatter:
157+
158+
```yaml
159+
sidebar_class_name: hidden
160+
```
161+
162+
## Docusaurus Configuration
163+
164+
`docusaurus.config.js` contains:
165+
166+
- Site metadata
167+
- Plugin configuration
168+
- Theme settings
169+
- Algolia search config
170+
- Navbar/footer structure
171+
- Mermaid diagram settings
172+
173+
Key plugins:
174+
- `@docusaurus/plugin-client-redirects` - Static redirects
175+
- `docusaurus-plugin-image-zoom` - Image lightbox
176+
- `docusaurus-plugin-llms` - LLM-friendly exports
177+
- `@docusaurus/theme-mermaid` - Diagram support
178+
179+
## Deployment
180+
181+
Production deployments happen via GitHub Actions. The build:
182+
1. Runs `npm install`
183+
2. Renders library docs (components, modules, actions)
184+
3. Runs `npm run build`
185+
4. Deploys to hosting
186+
187+
### Pre-deployment Checklist
188+
189+
- [ ] `npm run build` succeeds locally
190+
- [ ] `make lint` passes
191+
- [ ] All redirects added for moved/removed pages
192+
- [ ] No broken internal links
193+
194+
## Troubleshooting
195+
196+
### Build Fails with Link Error
197+
198+
```
199+
Error: Linking for Docs failed for /path/to/doc/
200+
```
201+
202+
Fix: Add redirect or fix the broken link.
203+
204+
### MDX Parse Error
205+
206+
```
207+
Could not parse MDX file
208+
```
209+
210+
Fix: Check for unclosed JSX tags, missing imports, or invalid syntax.
211+
212+
### Algolia Index Issues
213+
214+
Search is powered by Algolia. Index updates are handled automatically. For search issues, check the Algolia dashboard.
215+
216+
### Cache Issues
217+
218+
If seeing stale content:
219+
220+
```bash
221+
npm run clear
222+
npm start
223+
```

0 commit comments

Comments
 (0)