Skip to content

Commit 3354f49

Browse files
committed
docs(markdown): centralize clickable link guidance
- Add a global Markdown rule for clickable navigational URLs - Point documentation-specific guidance back to the shared rule - Update the rule index description to surface the link guidance Clarifies where clickable-link guidance lives so Markdown and documentation rules stay consistent instead of drifting apart.
1 parent 846473f commit 3354f49

4 files changed

Lines changed: 31 additions & 12 deletions

File tree

rules/800-markdown.mdc

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
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.
44
priority: 800
55
alwaysApply: true
66
files:
@@ -470,12 +470,35 @@ All documents should follow this structure:
470470
4. Use logical heading hierarchy (H2, H3, etc.)
471471
5. Incorporate **GitHub alerts** where they add value
472472
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)
474474
8. **Avoid decorative emojis** - use professional, clean formatting
475475
9. End with conclusion or next steps if applicable
476476

477477
---
478478

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+
479502
## Emoji Guidelines
480503

481504
**Do NOT use emojis in professional technical documentation.**
@@ -564,7 +587,7 @@ Emojis MAY be used in:
564587

565588
### General Markdown
566589
- 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**)
568591
- Use tables for structured data
569592
- Add horizontal rules (`---`) to separate sections
570593
- Maintain consistent formatting

rules/810-documentation.mdc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,7 @@ Success!
348348

349349
### Links Must Be Clickable
350350

351-
In documentation, prefer Markdown links so URLs render clickable in GitHub and common renderers.
352-
353-
- **Preferred**: `[AWS Lambda docs](https://docs.aws.amazon.com/lambda/)`
354-
- **NEVER USE** backticks for links that should be clickable: `` `https://docs.aws.amazon.com/lambda/` ``
355-
356-
> [!NOTE]
357-
> Wrap URLs in backticks only when the URL is being treated as a literal code value (for example, config, CLI output, or sample strings).
351+
Follow the global rule in **[800-markdown.mdc](800-markdown.mdc)** under **Links and URLs** (Markdown links for navigation; no backticks on clickable URLs except when the URL is a literal value).
358352

359353
## API Documentation
360354

rules/INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Quick lookup table for all Cursor rules files in `rules/`.
8282

8383
| File | Description | Priority | Always Apply |
8484
|------|-------------|----------|--------------|
85-
| [800-markdown.mdc](800-markdown.mdc) | Standardized rules for generating Markdown files using GitHub-flavored alerts and Mermaid diagrams for visual documentation. | 800 | Yes |
85+
| [800-markdown.mdc](800-markdown.mdc) | Markdown/MDX style: GitHub alerts, **clickable Markdown links** (no backticks on navigational URLs), and Mermaid diagrams. | 800 | Yes |
8686
| [810-documentation.mdc](810-documentation.mdc) | Patterns for creating effective documentation including documentation websites and markdown best practices. | 810 | No |
8787
| [820-open-source.mdc](820-open-source.mdc) | Best practices for open source projects including contribution guidelines, documentation, and community management. | 820 | No |
8888

skills/documentation-standards/references/markdown-mermaid.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ flowchart TD
8989

9090
#### Use Markdown links (not backticks) for clickable URLs
9191

92+
Canonical guidance: **800-markdown.mdc****Links and URLs** (global rule for all `.md` / `.mdx`).
93+
9294
In documentation, backticks render URLs as code and they are often **not clickable**.
9395

9496
- **Preferred**: `[AWS doc](https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html)`
95-
- **NEVER USE** backticks for links that should be clickable: `` `https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html` ``
97+
- **Do not** wrap navigational URLs in backticks: `` `https://docs.aws.amazon.com/vpc-lattice/latest/ug/auth-policies.html` ``
9698

9799
### Sequence Diagram
98100

0 commit comments

Comments
 (0)