com.wallstop-studios.dxmessaging 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.artifacts/SourceGenerators.Tests/obj/Debug/net9.0/WallstopStudios.DxMessaging.SourceGenerators.Tests.AssemblyInfo.cs +1 -1
- package/.cspell.json +4 -1
- package/.github/workflows/actionlint.yml +11 -1
- package/.github/workflows/csharpier-autofix.yml +34 -3
- package/.github/workflows/dotnet-tests.yml +13 -0
- package/.github/workflows/format-on-demand.yml +38 -44
- package/.github/workflows/json-format-check.yml +24 -0
- package/.github/workflows/lint-doc-links.yml +13 -0
- package/.github/workflows/markdown-json.yml +21 -4
- package/.github/workflows/markdown-link-text-check.yml +10 -0
- package/.github/workflows/markdown-link-validity.yml +10 -0
- package/.github/workflows/markdownlint.yml +7 -5
- package/.github/workflows/prettier-autofix.yml +67 -11
- package/.github/workflows/release-drafter.yml +2 -2
- package/.github/workflows/sync-wiki.yml +3 -3
- package/.github/workflows/yaml-format-lint.yml +26 -0
- package/.llm/context.md +113 -3
- package/.llm/skills/documentation/changelog-management.md +38 -0
- package/.llm/skills/documentation/documentation-style-guide.md +18 -0
- package/.llm/skills/documentation/documentation-update-workflow.md +2 -0
- package/.llm/skills/documentation/documentation-updates.md +2 -0
- package/.llm/skills/documentation/markdown-compatibility.md +476 -0
- package/.llm/skills/documentation/mermaid-theming.md +326 -0
- package/.llm/skills/documentation/mkdocs-navigation.md +290 -0
- package/.llm/skills/github-actions/git-renormalize-patterns.md +231 -0
- package/.llm/skills/github-actions/workflow-consistency.md +346 -0
- package/.llm/skills/index.md +53 -27
- package/.llm/skills/scripting/javascript-code-quality.md +417 -0
- package/.llm/skills/scripting/regex-documentation.md +461 -0
- package/.llm/skills/scripting/shell-best-practices.md +55 -4
- package/.llm/skills/scripting/validation-patterns.md +418 -0
- package/.llm/skills/specification.md +4 -1
- package/.llm/skills/testing/test-code-quality.md +243 -0
- package/.llm/skills/testing/test-production-code.md +348 -0
- package/CHANGELOG.md +24 -0
- package/README.md +113 -24
- package/Tests/Runtime/Benchmarks/WallstopStudios.DxMessaging.Tests.Runtime.Benchmarks.asmdef +1 -6
- package/Tests/Runtime/Integrations/Reflex/WallstopStudios.DxMessaging.Tests.Runtime.Reflex.asmdef +1 -1
- package/Tests/Runtime/Integrations/VContainer/WallstopStudios.DxMessaging.Tests.Runtime.VContainer.asmdef +1 -1
- package/Tests/Runtime/Integrations/Zenject/WallstopStudios.DxMessaging.Tests.Runtime.Zenject.asmdef +1 -1
- package/coverage/clover.xml +216 -3
- package/coverage/clover.xml.meta +7 -7
- package/coverage/coverage-final.json +2 -1
- package/coverage/coverage-final.json.meta +7 -7
- package/coverage/lcov-report/base.css.meta +1 -1
- package/coverage/lcov-report/block-navigation.js.meta +1 -1
- package/coverage/lcov-report/favicon.png.meta +1 -1
- package/coverage/lcov-report/index.html +25 -10
- package/coverage/lcov-report/index.html.meta +7 -7
- package/coverage/lcov-report/prettify.css.meta +1 -1
- package/coverage/lcov-report/prettify.js.meta +1 -1
- package/coverage/lcov-report/sort-arrow-sprite.png.meta +1 -1
- package/coverage/lcov-report/sorter.js.meta +1 -1
- package/coverage/lcov-report/transform-docs-to-wiki.js.html +1 -1
- package/coverage/lcov-report/transform-docs-to-wiki.js.html.meta +7 -7
- package/coverage/lcov-report/vendor.meta +1 -1
- package/coverage/lcov-report.meta +8 -8
- package/coverage/lcov.info +365 -0
- package/coverage/lcov.info.meta +7 -7
- package/docs/architecture/design-and-architecture.md +0 -1
- package/docs/concepts/index.md +37 -0
- package/docs/concepts/index.md.meta +7 -0
- package/docs/concepts/interceptors-and-ordering.md +0 -2
- package/docs/concepts/mental-model.md +390 -0
- package/docs/concepts/mental-model.md.meta +7 -0
- package/docs/concepts/message-types.md +0 -1
- package/docs/getting-started/getting-started.md +1 -0
- package/docs/getting-started/index.md +6 -5
- package/docs/getting-started/overview.md +1 -0
- package/docs/getting-started/quick-start.md +2 -1
- package/docs/getting-started/visual-guide.md +4 -10
- package/docs/hooks.py +10 -1
- package/docs/images/DxMessaging-banner.svg +1 -1
- package/docs/index.md +7 -7
- package/docs/javascripts/mermaid-config.js +44 -4
- package/docs/reference/helpers.md +130 -154
- package/docs/reference/quick-reference.md +5 -1
- package/docs/reference/reference.md +124 -130
- package/mkdocs.yml +2 -0
- package/package.json +7 -2
- package/scripts/__tests__/generate-skills-index.test.js +397 -0
- package/scripts/__tests__/generate-skills-index.test.js.meta +7 -0
- package/scripts/__tests__/mermaid-config.test.js +467 -0
- package/scripts/__tests__/mermaid-config.test.js.meta +7 -0
- package/scripts/__tests__/validate-skills-optional-fields.test.js +1474 -0
- package/scripts/__tests__/validate-skills-optional-fields.test.js.meta +7 -0
- package/scripts/__tests__/validate-skills-required-fields.test.js +188 -0
- package/scripts/__tests__/validate-skills-required-fields.test.js.meta +7 -0
- package/scripts/__tests__/validate-skills-tags.test.js +353 -0
- package/scripts/__tests__/validate-skills-tags.test.js.meta +7 -0
- package/scripts/__tests__/validate-workflows.test.js +188 -0
- package/scripts/__tests__/validate-workflows.test.js.meta +7 -0
- package/scripts/generate-skills-index.js +88 -3
- package/scripts/validate-skills.js +230 -30
- package/scripts/validate-workflows.js +272 -0
- package/scripts/validate-workflows.js.meta +7 -0
- package/scripts/wiki/generate-wiki-sidebar.js.meta +1 -8
- package/scripts/wiki/transform-docs-to-wiki.js.meta +1 -1
- package/site/404.html +1 -1
- package/site/advanced/emit-shorthands/index.html +2 -2
- package/site/advanced/message-bus-providers/index.html +2 -2
- package/site/advanced/registration-builders/index.html +2 -2
- package/site/advanced/runtime-configuration/index.html +2 -2
- package/site/advanced/string-messages/index.html +2 -2
- package/site/advanced.meta +1 -1
- package/site/architecture/comparisons/index.html +2 -2
- package/site/architecture/design-and-architecture/index.html +2 -2
- package/site/architecture/performance/index.html +1 -1
- package/site/architecture.meta +1 -1
- package/site/concepts/index.html +1 -0
- package/site/concepts/index.html.meta +7 -0
- package/site/concepts/interceptors-and-ordering/index.html +4 -4
- package/site/concepts/listening-patterns/index.html +2 -2
- package/site/concepts/mental-model/index.html +146 -0
- package/site/concepts/mental-model/index.html.meta +7 -0
- package/site/concepts/mental-model.meta +8 -0
- package/site/concepts/message-types/index.html +2 -2
- package/site/concepts/targeting-and-context/index.html +2 -2
- package/site/concepts.meta +1 -1
- package/site/examples/end-to-end/index.html +2 -2
- package/site/examples/end-to-end-scene-transitions/index.html +2 -2
- package/site/examples.meta +1 -1
- package/site/getting-started/getting-started/index.html +3 -3
- package/site/getting-started/index.html +4 -4
- package/site/getting-started/install/index.html +3 -3
- package/site/getting-started/overview/index.html +2 -2
- package/site/getting-started/quick-start/index.html +2 -2
- package/site/getting-started/visual-guide/index.html +11 -11
- package/site/getting-started.meta +1 -1
- package/site/guides/advanced/index.html +2 -2
- package/site/guides/diagnostics/index.html +2 -2
- package/site/guides/migration-guide/index.html +2 -2
- package/site/guides/patterns/index.html +2 -2
- package/site/guides/testing/index.html +2 -2
- package/site/guides/unity-integration/index.html +2 -2
- package/site/guides.meta +1 -1
- package/site/hooks.py.meta +1 -1
- package/site/images/DxMessaging-banner.svg +119 -0
- package/site/images/DxMessaging-banner.svg.meta +7 -0
- package/site/images.meta +8 -0
- package/site/index.html +2 -2
- package/site/integrations/index.html +2 -2
- package/site/integrations/reflex/index.html +2 -2
- package/site/integrations/vcontainer/index.html +2 -2
- package/site/integrations/zenject/index.html +2 -2
- package/site/integrations.meta +1 -1
- package/site/javascripts/csharp-highlight.js.meta +7 -7
- package/site/javascripts/mermaid-config.js +4 -1
- package/site/javascripts/mermaid-config.js.meta +1 -1
- package/site/javascripts.meta +1 -1
- package/site/reference/compatibility/index.html +1 -1
- package/site/reference/faq/index.html +1 -1
- package/site/reference/glossary/index.html +2 -2
- package/site/reference/helpers/index.html +15 -15
- package/site/reference/quick-reference/index.html +3 -3
- package/site/reference/reference/index.html +37 -37
- package/site/reference/troubleshooting/index.html +1 -1
- package/site/reference.meta +1 -1
- package/site/search/search_index.json +1 -1
- package/site/sitemap.xml +46 -38
- package/site/sitemap.xml.gz +0 -0
- package/site/stylesheets/extra.css.meta +1 -1
- package/site/stylesheets.meta +1 -1
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Markdown Compatibility Guidelines"
|
|
3
|
+
id: "markdown-compatibility"
|
|
4
|
+
category: "documentation"
|
|
5
|
+
version: "1.2.0"
|
|
6
|
+
created: "2026-01-29"
|
|
7
|
+
updated: "2026-01-29"
|
|
8
|
+
|
|
9
|
+
source:
|
|
10
|
+
repository: "wallstop/DxMessaging"
|
|
11
|
+
files:
|
|
12
|
+
- path: "docs/"
|
|
13
|
+
- path: "README.md"
|
|
14
|
+
url: "https://github.com/wallstop/DxMessaging"
|
|
15
|
+
|
|
16
|
+
tags:
|
|
17
|
+
- "documentation"
|
|
18
|
+
- "markdown"
|
|
19
|
+
- "compatibility"
|
|
20
|
+
- "mkdocs"
|
|
21
|
+
- "portability"
|
|
22
|
+
|
|
23
|
+
complexity:
|
|
24
|
+
level: "basic"
|
|
25
|
+
reasoning: "Simple syntax substitutions for cross-platform compatibility"
|
|
26
|
+
|
|
27
|
+
impact:
|
|
28
|
+
performance:
|
|
29
|
+
rating: "none"
|
|
30
|
+
details: "Documentation only"
|
|
31
|
+
maintainability:
|
|
32
|
+
rating: "high"
|
|
33
|
+
details: "Ensures docs render correctly in all viewers without maintenance burden"
|
|
34
|
+
testability:
|
|
35
|
+
rating: "none"
|
|
36
|
+
details: "Documentation does not affect testability"
|
|
37
|
+
|
|
38
|
+
prerequisites:
|
|
39
|
+
- "Understanding of Markdown"
|
|
40
|
+
|
|
41
|
+
dependencies:
|
|
42
|
+
packages: []
|
|
43
|
+
skills:
|
|
44
|
+
- "documentation-style-guide"
|
|
45
|
+
- "documentation-updates"
|
|
46
|
+
|
|
47
|
+
applies_to:
|
|
48
|
+
languages:
|
|
49
|
+
- "Markdown"
|
|
50
|
+
frameworks:
|
|
51
|
+
- "MkDocs"
|
|
52
|
+
- "GitHub"
|
|
53
|
+
- "VS Code"
|
|
54
|
+
|
|
55
|
+
aliases:
|
|
56
|
+
- "Portable markdown"
|
|
57
|
+
- "Cross-platform docs"
|
|
58
|
+
- "MkDocs alternatives"
|
|
59
|
+
|
|
60
|
+
related:
|
|
61
|
+
- "documentation-style-guide"
|
|
62
|
+
- "documentation-updates"
|
|
63
|
+
- "mkdocs-navigation"
|
|
64
|
+
- "mermaid-theming"
|
|
65
|
+
|
|
66
|
+
status: "stable"
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# Markdown Compatibility Guidelines
|
|
70
|
+
|
|
71
|
+
> **One-line summary**: Use only standard markdown syntax that renders correctly in GitHub, VS Code, and MkDocs simultaneously.
|
|
72
|
+
|
|
73
|
+
## Overview
|
|
74
|
+
|
|
75
|
+
This project's documentation must render correctly across multiple platforms:
|
|
76
|
+
|
|
77
|
+
- **GitHub's markdown viewer** (README, docs in repo)
|
|
78
|
+
- **VS Code markdown preview** (local development)
|
|
79
|
+
- **Standard markdown renderers** (third-party tools, npm packages)
|
|
80
|
+
- **MkDocs** (docs site build)
|
|
81
|
+
|
|
82
|
+
Using MkDocs-specific syntax breaks rendering in standard viewers, creating a poor experience for users who browse documentation on GitHub or in their editor.
|
|
83
|
+
|
|
84
|
+
## Problem Statement
|
|
85
|
+
|
|
86
|
+
MkDocs and its Material theme provide powerful extensions like admonitions, tabs, and buttons. However, these extensions use non-standard syntax that renders as broken text in standard markdown viewers:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
!!! warning "Caution"
|
|
90
|
+
This will not render correctly on GitHub.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
On GitHub, this displays as literal text: `!!! warning "Caution"` followed by an indented paragraph—not as a styled warning box.
|
|
94
|
+
|
|
95
|
+
## Solution
|
|
96
|
+
|
|
97
|
+
Use only standard markdown syntax with Unicode emoji for visual emphasis. This ensures consistent rendering across all platforms.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Nested Fenced Code Blocks
|
|
102
|
+
|
|
103
|
+
When documenting markdown that contains code blocks, the **outer fence must have MORE backticks than any inner fence**. CommonMark requires opening and closing sequences to match exactly, so use 4+ backticks for outer fences when inner uses 3:
|
|
104
|
+
|
|
105
|
+
`````markdown
|
|
106
|
+
````markdown
|
|
107
|
+
This outer fence uses 4 backticks.
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
print("Hello")
|
|
111
|
+
```
|
|
112
|
+
````
|
|
113
|
+
`````
|
|
114
|
+
|
|
115
|
+
For deeper nesting, keep increasing: outer uses 5, middle uses 4, inner uses 3.
|
|
116
|
+
|
|
117
|
+
### Common Mistakes
|
|
118
|
+
|
|
119
|
+
| Mistake | Problem | Fix |
|
|
120
|
+
| ------------------- | ------------------------------------ | ------------------------------ |
|
|
121
|
+
| Same backtick count | Inner fence closes outer prematurely | More backticks on outer |
|
|
122
|
+
| Spaces in fence | ` ``` ` may not parse | No spaces in backtick sequence |
|
|
123
|
+
| Mismatched closing | Opening with 4, closing with 3 | Count must match exactly |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Forbidden Syntax and Alternatives
|
|
128
|
+
|
|
129
|
+
### 1. Admonitions
|
|
130
|
+
|
|
131
|
+
Admonitions (callout boxes) are a common MkDocs extension that use `!!!` syntax.
|
|
132
|
+
|
|
133
|
+
#### ❌ Forbidden: MkDocs Admonitions
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
!!! note "Important"
|
|
137
|
+
This is a note admonition that only renders in MkDocs.
|
|
138
|
+
|
|
139
|
+
!!! warning "Caution"
|
|
140
|
+
This warning will appear as broken text on GitHub.
|
|
141
|
+
|
|
142
|
+
!!! danger "Critical"
|
|
143
|
+
This danger callout is MkDocs-specific.
|
|
144
|
+
|
|
145
|
+
!!! tip "Pro Tip"
|
|
146
|
+
This tip syntax is not standard markdown.
|
|
147
|
+
|
|
148
|
+
!!! info
|
|
149
|
+
Admonitions without titles are also forbidden.
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### ✅ Correct: Blockquotes with Emoji
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
> ℹ️ **Note**: This is a note that renders everywhere.
|
|
156
|
+
|
|
157
|
+
> ⚠️ **Caution**: This warning displays correctly on all platforms.
|
|
158
|
+
|
|
159
|
+
> 🚨 **Critical**: This danger callout works universally.
|
|
160
|
+
|
|
161
|
+
> 💡 **Tip**: This tip renders in any markdown viewer.
|
|
162
|
+
|
|
163
|
+
> 📝 **Info**: Use descriptive emoji to convey meaning.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Emoji reference for common admonition types**:
|
|
167
|
+
|
|
168
|
+
| Type | Emoji | Example |
|
|
169
|
+
| -------- | ----- | ------------------------ |
|
|
170
|
+
| Note | ℹ️ | `> ℹ️ **Note**: ...` |
|
|
171
|
+
| Warning | ⚠️ | `> ⚠️ **Warning**: ...` |
|
|
172
|
+
| Danger | 🚨 | `> 🚨 **Danger**: ...` |
|
|
173
|
+
| Tip | 💡 | `> 💡 **Tip**: ...` |
|
|
174
|
+
| Info | 📝 | `> 📝 **Info**: ...` |
|
|
175
|
+
| Success | ✅ | `> ✅ **Success**: ...` |
|
|
176
|
+
| Error | ❌ | `> ❌ **Error**: ...` |
|
|
177
|
+
| Example | 📌 | `> 📌 **Example**: ...` |
|
|
178
|
+
| See Also | 🔗 | `> 🔗 **See Also**: ...` |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### 2. Collapsible Admonitions
|
|
183
|
+
|
|
184
|
+
MkDocs supports collapsible sections with `???` syntax.
|
|
185
|
+
|
|
186
|
+
#### ❌ Forbidden: MkDocs Collapsibles
|
|
187
|
+
|
|
188
|
+
```markdown
|
|
189
|
+
??? note "Click to expand"
|
|
190
|
+
This content is hidden by default in MkDocs.
|
|
191
|
+
It appears as broken syntax elsewhere.
|
|
192
|
+
|
|
193
|
+
???+ warning "Expanded by default"
|
|
194
|
+
The plus makes it expanded initially.
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### ✅ Correct: Use Details/Summary HTML
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
<details>
|
|
201
|
+
<summary>Click to expand</summary>
|
|
202
|
+
|
|
203
|
+
This content is hidden by default and works in GitHub and VS Code.
|
|
204
|
+
|
|
205
|
+
Note: Leave a blank line after `<summary>` for proper markdown rendering inside.
|
|
206
|
+
|
|
207
|
+
</details>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Or simply use a regular section if collapsibility is not essential:
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
### Additional Details
|
|
214
|
+
|
|
215
|
+
This content is always visible, which is often clearer for users.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### 3. Content Tabs
|
|
221
|
+
|
|
222
|
+
MkDocs Material provides tabbed content with `===` syntax.
|
|
223
|
+
|
|
224
|
+
#### ❌ Forbidden: MkDocs Tabs
|
|
225
|
+
|
|
226
|
+
```markdown
|
|
227
|
+
=== "Python"
|
|
228
|
+
`python
|
|
229
|
+
print("Hello")
|
|
230
|
+
`
|
|
231
|
+
|
|
232
|
+
=== "JavaScript"
|
|
233
|
+
`javascript
|
|
234
|
+
console.log("Hello");
|
|
235
|
+
`
|
|
236
|
+
|
|
237
|
+
=== "C#"
|
|
238
|
+
`csharp
|
|
239
|
+
Console.WriteLine("Hello");
|
|
240
|
+
`
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### ✅ Correct: Use Headers
|
|
244
|
+
|
|
245
|
+
````markdown
|
|
246
|
+
### Python
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
print("Hello")
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### JavaScript
|
|
253
|
+
|
|
254
|
+
```javascript
|
|
255
|
+
console.log("Hello");
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### C#
|
|
259
|
+
|
|
260
|
+
```csharp
|
|
261
|
+
Console.WriteLine("Hello");
|
|
262
|
+
```
|
|
263
|
+
````
|
|
264
|
+
|
|
265
|
+
For installation instructions or platform-specific content, headers provide clear navigation and work universally.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
### 4. Button Attributes
|
|
270
|
+
|
|
271
|
+
MkDocs Material supports styled buttons via attribute syntax.
|
|
272
|
+
|
|
273
|
+
#### ❌ Forbidden: Button Attributes
|
|
274
|
+
|
|
275
|
+
```markdown
|
|
276
|
+
[Get Started](getting-started.md){ .md-button }
|
|
277
|
+
|
|
278
|
+
[Download](https://example.com/download){ .md-button .md-button--primary }
|
|
279
|
+
|
|
280
|
+
[:fontawesome-brands-github: View on GitHub](https://github.com/example){ .md-button }
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
#### ✅ Correct: Standard Links
|
|
284
|
+
|
|
285
|
+
```markdown
|
|
286
|
+
[Get Started](getting-started.md)
|
|
287
|
+
|
|
288
|
+
[Download](https://example.com/download)
|
|
289
|
+
|
|
290
|
+
[View on GitHub](https://github.com/example)
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
If you need visual emphasis, use bold or place links prominently:
|
|
294
|
+
|
|
295
|
+
```markdown
|
|
296
|
+
**[Get Started →](getting-started.md)**
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
### 5. Emoji Shortcodes
|
|
302
|
+
|
|
303
|
+
MkDocs uses `:emoji_name:` shortcode syntax from the `pymdownx.emoji` extension.
|
|
304
|
+
|
|
305
|
+
#### ❌ Forbidden: Emoji Shortcodes
|
|
306
|
+
|
|
307
|
+
```markdown
|
|
308
|
+
:warning: This is a warning.
|
|
309
|
+
|
|
310
|
+
:rocket: Fast performance!
|
|
311
|
+
|
|
312
|
+
:white_check_mark: Test passed.
|
|
313
|
+
|
|
314
|
+
:fontawesome-brands-github: GitHub integration.
|
|
315
|
+
|
|
316
|
+
:material-code-braces: Code example.
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
> ⚠️ **Note**: Material for MkDocs provides icon shortcodes that must also be avoided:
|
|
320
|
+
>
|
|
321
|
+
> - `:material-*:` patterns (e.g., `:material-code-braces:`, `:material-check:`)
|
|
322
|
+
> - `:octicons-*:` patterns (e.g., `:octicons-git-branch-16:`)
|
|
323
|
+
> - `:fontawesome-*:` patterns (e.g., `:fontawesome-brands-github:`)
|
|
324
|
+
> - `:simple-*:` patterns (e.g., `:simple-python:`)
|
|
325
|
+
>
|
|
326
|
+
> These render as literal text in standard markdown viewers.
|
|
327
|
+
|
|
328
|
+
#### ✅ Correct: Unicode Emoji Directly
|
|
329
|
+
|
|
330
|
+
```markdown
|
|
331
|
+
⚠️ This is a warning.
|
|
332
|
+
|
|
333
|
+
🚀 Fast performance!
|
|
334
|
+
|
|
335
|
+
✅ Test passed.
|
|
336
|
+
|
|
337
|
+
GitHub integration (use text, not icon).
|
|
338
|
+
|
|
339
|
+
Code example (describe with words).
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Common emoji substitutions**:
|
|
343
|
+
|
|
344
|
+
| Shortcode | Unicode | Copy-paste |
|
|
345
|
+
| ---------------------- | ------- | ---------- |
|
|
346
|
+
| `:warning:` | ⚠️ | ⚠️ |
|
|
347
|
+
| `:rocket:` | 🚀 | 🚀 |
|
|
348
|
+
| `:white_check_mark:` | ✅ | ✅ |
|
|
349
|
+
| `:x:` | ❌ | ❌ |
|
|
350
|
+
| `:bulb:` | 💡 | 💡 |
|
|
351
|
+
| `:information_source:` | ℹ️ | ℹ️ |
|
|
352
|
+
| `:fire:` | 🔥 | 🔥 |
|
|
353
|
+
| `:star:` | ⭐ | ⭐ |
|
|
354
|
+
| `:book:` | 📖 | 📖 |
|
|
355
|
+
| `:wrench:` | 🔧 | 🔧 |
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### 6. Other MkDocs-Specific Syntax
|
|
360
|
+
|
|
361
|
+
#### ❌ Forbidden: Annotations
|
|
362
|
+
|
|
363
|
+
```markdown
|
|
364
|
+
Some code (1)
|
|
365
|
+
{ .annotate }
|
|
366
|
+
|
|
367
|
+
1. This is an annotation that appears on hover.
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
#### ❌ Forbidden: Keys Extension
|
|
371
|
+
|
|
372
|
+
```markdown
|
|
373
|
+
Press ++ctrl+alt+del++ to restart.
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
#### ❌ Forbidden: Critic Markup
|
|
377
|
+
|
|
378
|
+
```markdown
|
|
379
|
+
{--deleted text--}
|
|
380
|
+
{++inserted text++}
|
|
381
|
+
{~~old~>new~~}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
#### ✅ Correct: Use Plain Descriptions
|
|
385
|
+
|
|
386
|
+
```markdown
|
|
387
|
+
Some code <!-- Explanation in a comment or below -->
|
|
388
|
+
|
|
389
|
+
Press `Ctrl+Alt+Del` to restart.
|
|
390
|
+
|
|
391
|
+
Changed "old text" to "new text".
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Quick Reference
|
|
397
|
+
|
|
398
|
+
| Feature | MkDocs Syntax | Standard Alternative |
|
|
399
|
+
| ----------- | --------------------------- | ---------------------------------- |
|
|
400
|
+
| Note | `!!! note` | `> ℹ️ **Note**: ...` |
|
|
401
|
+
| Warning | `!!! warning` | `> ⚠️ **Warning**: ...` |
|
|
402
|
+
| Danger | `!!! danger` | `> 🚨 **Danger**: ...` |
|
|
403
|
+
| Tip | `!!! tip` | `> 💡 **Tip**: ...` |
|
|
404
|
+
| Collapsible | `??? note` | `<details><summary>...</summary>` |
|
|
405
|
+
| Tabs | `=== "Tab"` | `### Tab` headers |
|
|
406
|
+
| Button | `[text](url){ .md-button }` | `[text](url)` or `**[text](url)**` |
|
|
407
|
+
| Emoji | `:emoji:` | Unicode emoji: ⚠️ 🚀 ✅ |
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Mermaid Diagram Theming
|
|
412
|
+
|
|
413
|
+
> 🔗 **See [Mermaid Theming](mermaid-theming.md)** for complete guidance on Mermaid diagram theming in MkDocs Material.
|
|
414
|
+
|
|
415
|
+
**Key rule**: Do not use `%%{init: {'theme': '...'}}%%` directives in `docs/` files. The global `mermaid-config.js` handles theme-aware rendering automatically.
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Validation
|
|
420
|
+
|
|
421
|
+
Before committing documentation changes:
|
|
422
|
+
|
|
423
|
+
1. **Preview in VS Code**: Use `Ctrl+Shift+V` to open markdown preview
|
|
424
|
+
1. **Check on GitHub**: View the file in GitHub's web interface after pushing
|
|
425
|
+
1. **Search for forbidden patterns**: `grep -E '^(!!!|\?\?\?|===)' docs/`
|
|
426
|
+
|
|
427
|
+
### Automated Check (Optional)
|
|
428
|
+
|
|
429
|
+
Add to your review process:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
# Find MkDocs-specific syntax in markdown files
|
|
433
|
+
grep -rn --include='*.md' -E '^(!!!|\?\?\?|===)' docs/
|
|
434
|
+
grep -rn --include='*.md' '{ *\.md-button' docs/
|
|
435
|
+
grep -rn --include='*.md' ':[a-z_]+:' docs/ | grep -v 'https://'
|
|
436
|
+
# Find per-diagram Mermaid theme directives (forbidden in docs/)
|
|
437
|
+
grep -rn --include='*.md' "%%{init.*theme" docs/
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## Why This Matters
|
|
443
|
+
|
|
444
|
+
1. **GitHub is the primary documentation surface**: Most users first encounter docs in the repository, not the built site.
|
|
445
|
+
|
|
446
|
+
1. **Editor preview during development**: Contributors use VS Code preview while editing; broken syntax slows them down.
|
|
447
|
+
|
|
448
|
+
1. **Third-party integrations**: Tools like npm, documentation aggregators, and AI assistants read raw markdown.
|
|
449
|
+
|
|
450
|
+
1. **Graceful degradation**: Even if MkDocs adds features, the docs remain readable everywhere.
|
|
451
|
+
|
|
452
|
+
1. **Reduced maintenance burden**: No need to maintain two versions or worry about platform-specific rendering bugs.
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## See Also
|
|
457
|
+
|
|
458
|
+
- [Documentation Style Guide](documentation-style-guide.md)
|
|
459
|
+
- [Documentation Updates](documentation-updates.md)
|
|
460
|
+
- [Mermaid Diagram Theming](mermaid-theming.md)
|
|
461
|
+
- [MkDocs Navigation](mkdocs-navigation.md)
|
|
462
|
+
|
|
463
|
+
## References
|
|
464
|
+
|
|
465
|
+
- [CommonMark Specification](https://spec.commonmark.org/)
|
|
466
|
+
- [GitHub Flavored Markdown](https://github.github.com/gfm/)
|
|
467
|
+
- [MkDocs Material Extensions](https://squidfunk.github.io/mkdocs-material/reference/)
|
|
468
|
+
- [Mermaid Theming](https://mermaid.js.org/config/theming.html)
|
|
469
|
+
|
|
470
|
+
## Changelog
|
|
471
|
+
|
|
472
|
+
| Version | Date | Changes |
|
|
473
|
+
| ------- | ---------- | --------------------------------------------------- |
|
|
474
|
+
| 1.2.0 | 2026-01-29 | Added nested fenced code blocks section |
|
|
475
|
+
| 1.1.0 | 2026-01-29 | Added Mermaid diagram theming section |
|
|
476
|
+
| 1.0.0 | 2026-01-29 | Initial version with forbidden syntax documentation |
|