|
1 | 1 | --- |
2 | 2 | title: Markdown & Diagramming Style Guide |
3 | | -description: Standardized rules for generating Markdown files using GitHub-flavored alerts and Mermaid diagrams for visual documentation. |
| 3 | +description: Standardized rules for generating Markdown files using GitHub-flavored alerts, clickable links, and Mermaid diagrams for visual documentation. |
4 | 4 | priority: 800 |
5 | 5 | alwaysApply: true |
6 | 6 | files: |
@@ -470,12 +470,35 @@ All documents should follow this structure: |
470 | 470 | 4. Use logical heading hierarchy (H2, H3, etc.) |
471 | 471 | 5. Incorporate **GitHub alerts** where they add value |
472 | 472 | 6. Use **Mermaid diagrams** to visualize complex concepts |
473 | | -7. Use proper markdown formatting (lists, code blocks, links, emphasis) |
| 473 | +7. Use proper markdown formatting (lists, code blocks, links, emphasis); navigational URLs must be Markdown links, not backticks (see **Links and URLs** below) |
474 | 474 | 8. **Avoid decorative emojis** - use professional, clean formatting |
475 | 475 | 9. End with conclusion or next steps if applicable |
476 | 476 |
|
477 | 477 | --- |
478 | 478 |
|
| 479 | +## Links and URLs |
| 480 | + |
| 481 | +This applies to **all** Markdown and MDX in the workspace (READMEs, rules, docs, ADRs, PR bodies when using Markdown, etc.). |
| 482 | + |
| 483 | +### Navigational links must be clickable |
| 484 | + |
| 485 | +Use standard Markdown links so URLs render as clickable in GitHub, IDEs, and common static-site renderers. Prefer descriptive link text. |
| 486 | + |
| 487 | +- **Preferred**: `[AWS Lambda documentation](https://docs.aws.amazon.com/lambda/)` |
| 488 | +- **Avoid for navigation**: bare URLs in running text when a short label reads better (still use `https://...` in link target) |
| 489 | +- **Do not** wrap URLs that readers should **click** in backticks: `` `https://docs.aws.amazon.com/lambda/` `` — inline code styling often prevents click-through and copies poorly. |
| 490 | + |
| 491 | +### When backticks around a URL are correct |
| 492 | + |
| 493 | +Wrap a URL in backticks only when it is a **literal value**, not a navigation affordance—for example: configuration samples, CLI transcripts, log lines, schema defaults, or strings inside code-oriented examples. |
| 494 | + |
| 495 | +### Paths and anchors |
| 496 | + |
| 497 | +- Use relative paths for same-repo docs when practical: `[Contributing](../CONTRIBUTING.md)` |
| 498 | +- For file paths shown as literals (not links), backticks remain appropriate: `` `src/app.ts` `` |
| 499 | + |
| 500 | +--- |
| 501 | + |
479 | 502 | ## Emoji Guidelines |
480 | 503 |
|
481 | 504 | **Do NOT use emojis in professional technical documentation.** |
@@ -564,7 +587,7 @@ Emojis MAY be used in: |
564 | 587 |
|
565 | 588 | ### General Markdown |
566 | 589 | - Use code blocks with syntax highlighting |
567 | | -- Include links to external resources |
| 590 | +- Use Markdown links for external resources and internal docs (**Links and URLs**) |
568 | 591 | - Use tables for structured data |
569 | 592 | - Add horizontal rules (`---`) to separate sections |
570 | 593 | - Maintain consistent formatting |
|
0 commit comments