Skip to content

Commit 563f879

Browse files
committed
docs: remove unused _redirects file and document redirect process
The _redirects file format is used by Netlify and Cloudflare Pages, but coder.com runs on Vercel with Next.js. Redirects for coder.com/docs must be configured in the coder/coder.com repository redirects.json file. This file was never functional and caused confusion when renaming docs. Changes: - Remove docs/_redirects - Add URL Redirects section to .claude/docs/DOCS_STYLE_GUIDE.md - Fix pre-existing markdown lint issues in DOCS_STYLE_GUIDE.md
1 parent ea9f003 commit 563f879

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

.claude/docs/DOCS_STYLE_GUIDE.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This guide documents documentation patterns observed in the Coder repository, ba
66

77
Before documenting a feature:
88

9-
1. **Research similar documentation** - Read recent documentation pages in `docs/` to understand writing style, structure, and conventions for your content type (admin guides, tutorials, reference docs, etc.)
9+
1. **Research similar documentation** - Read 10+ similar pages in `docs/` to understand writing style, structure, and conventions for your content type (admin guides, tutorials, reference docs, etc.)
1010
2. **Read the code implementation** - Check backend endpoints, frontend components, database queries
1111
3. **Verify permissions model** - Look up RBAC actions in `coderd/rbac/` (e.g., `view_insights` for Template Insights)
1212
4. **Check UI thresholds and defaults** - Review frontend code for color thresholds, time intervals, display logic
@@ -42,7 +42,10 @@ Template Insights provides detailed analytics and usage metrics for your Coder t
4242

4343
### Premium Feature Callout
4444

45-
For Premium-only features, add `(Premium)` suffix to the H1 heading. The documentation system automatically links these to premium pricing information. You should also add a premium badge in the `docs/manifest.json` file with `"state": ["premium"]`.
45+
For Premium-only features:
46+
47+
1. Add `(Premium)` suffix to the H1 heading - the documentation system automatically links these to premium pricing information
48+
2. Add premium badge in `manifest.json` with `"state": ["premium"]`
4649

4750
```markdown
4851
# Template Insights (Premium)
@@ -91,7 +94,7 @@ When you have multiple screenshots showing different aspects of a feature:
9194

9295
### Screenshot Guidelines
9396

94-
**When screenshots are not yet available**: If you're documenting a feature before screenshots exist, you can use image placeholders with descriptive alt text and ask the user to provide screenshots:
97+
**When screenshots are not available**: Use image placeholders with descriptive alt text and ask the user to provide screenshots:
9598

9699
```markdown
97100
![Placeholder: Template Insights page showing weekly active users chart](../../images/admin/templates/template-insights.png)
@@ -131,7 +134,7 @@ Then ask: "Could you provide a screenshot of the Template Insights page? I've ad
131134
- `> [!NOTE]` for additional information
132135
- `> [!WARNING]` for important warnings
133136
- `> [!TIP]` for helpful tips
134-
- **Tabs**: Use tabs for presenting related but parallel content, such as different installation methods or platform-specific instructions. Tabs work well when readers need to choose one path that applies to their specific situation.
137+
- **Tabs**: Use tabs to present related but parallel documentation paths (e.g., different installation methods, platform-specific instructions)
135138

136139
## Writing Style
137140

@@ -160,19 +163,17 @@ Then ask: "Could you provide a screenshot of the Template Insights page? I've ad
160163

161164
### Command Examples
162165

163-
````markdown
166+
Use `sh` language for shell commands:
167+
164168
```sh
165169
coder server --disable-template-insights
166170
```
167-
````
168171

169172
### Environment Variables
170173

171-
````markdown
172174
```sh
173175
CODER_DISABLE_TEMPLATE_INSIGHTS=true
174176
```
175-
````
176177

177178
### Code Comments
178179

@@ -189,8 +190,6 @@ Use relative paths from current file location:
189190
- `[Template Permissions](./template-permissions.md)`
190191
- `[API documentation](../../reference/api/insights.md)`
191192

192-
For cross-linking to Coder registry templates or other external Coder resources, reference the appropriate registry URLs.
193-
194193
### Cross-References
195194

196195
- Link to related documentation at the end
@@ -300,10 +299,22 @@ Some content is auto-generated with comments:
300299

301300
Don't manually edit auto-generated sections.
302301

302+
## URL Redirects
303+
304+
When renaming or moving documentation pages, redirects must be added to prevent broken links.
305+
306+
**Important**: Redirects are NOT configured in this repository. The coder.com website runs on Vercel with Next.js and reads redirects from a separate repository:
307+
308+
- **Redirect configuration**: https://github.com/coder/coder.com/blob/master/redirects.json
309+
- **Do NOT create** a `docs/_redirects` file - this format (used by Netlify/Cloudflare Pages) is not processed by coder.com
310+
311+
When you rename or move a doc page, create a PR in coder/coder.com to add the redirect.
312+
303313
## Key Principles
304314

305315
1. **Research first** - Verify against actual code implementation
306316
2. **Be precise** - Use exact numbers, permission names, API paths
307317
3. **Visual structure** - Organize around screenshots when available
308318
4. **Link everything** - Related docs, API endpoints, CLI references
309319
5. **Manifest inclusion** - Add to manifest.json for navigation
320+
6. **Add redirects** - When moving/renaming pages, add redirects in coder/coder.com repo

docs/_redirects

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)