Skip to content

Commit 0f77059

Browse files
authored
Improve syntax quick ref (#1148)
* yay for clarity and accessibility * consistency tweaks
1 parent 85ea8f8 commit 0f77059

File tree

2 files changed

+84
-80
lines changed

2 files changed

+84
-80
lines changed

docs/syntax/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
Elastic Docs V3 uses [Markdown](https://commonmark.org) as its main content authoring format.
44

5-
:::{admonition} New to Markdown?
6-
[Learn Markdown in just 10 minutes](https://commonmark.org/help/).
5+
:::{admonition} New to Elastic Docs V3?
6+
* Learn [Markdown](https://commonmark.org/help/) in 10 minutes
7+
* Review the V3 [](quick-ref.md)
78
:::
89

910
V3 fully supports [CommonMark](https://commonmark.org/), a strongly defined, standard-compliant Markdown specification. In many cases, plain Markdown syntax will be sufficient when authoring Elastic content. On top of this functionality, there are two main syntax extension points:

docs/syntax/quick-ref.md

Lines changed: 81 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ These examples show the syntax first, followed by the rendered admonition.
6969
::::
7070

7171
**DOs**<br>
72-
✅ Use custom admonitions as needed
72+
**Do:** Use custom admonitions as needed
7373

7474
**DON'Ts**<br>
75-
❌ Stack admonitions<br>
76-
❌ Overload a page with too many admonitions<br>
75+
**Don't:** Stack admonitions<br>
76+
**Don't:** Overload a page with too many admonitions
77+
78+
[More details: Admonitions →](admonitions.md)
79+
<br>
7780
<br>
7881

7982
---
@@ -97,11 +100,11 @@ A default anchor is automatically created for each [heading](#headings), in the
97100
:::
98101

99102
**DOs**<br>
100-
✅ Create custom anchors for repeated structural headings like "Example request"<br>
103+
**Do:** Create custom anchors for repeated structural headings like "Example request"<br>
101104

102105
**DON'Ts**<br>
103-
❌ Include punctuation marks in custom anchors<br>
104-
❌ Define custom anchors in text that is not a heading
106+
**Don't:** Include punctuation marks in custom anchors<br>
107+
**Don't:** Define custom anchors in text that is not a heading
105108

106109
[More details: Links →](links.md#same-page-links-anchors)
107110
<br>
@@ -142,14 +145,14 @@ The `applies_to` tags are scope signals for readers, not comprehensive metadata.
142145
% TODO restore details when guidance has settled
143146

144147
**DOs**<br>
145-
✅ Define a set of [page-level tags](applies.md#page-annotations) in a front matter block<br>
146-
✅ Add section-level tags in an `{applies_to}` [directive](applies.md#sections) after a heading<br>
147-
✅ Indicate versions (`major.minor` with an optional `[.patch]`) and release phases like `beta`
148+
**Do:** Define a set of [page-level tags](applies.md#page-annotations) in a front matter block<br>
149+
**Do:** Add section-level tags in an `{applies_to}` [directive](applies.md#sections) after a heading<br>
150+
**Do:** Indicate versions (`major.minor` with an optional `[.patch]`) and release phases like `beta`
148151

149152
**DON'Ts**<br>
150-
❌ Include `applies_to` tags in admonitions<br>
151-
❌ Add `applies_to` tags to general, broadly applicable content<br>
152-
❌ Use `Coming (x.x.x)` tags, except in special cases (don't pre-announce features)
153+
**Don't:** Include `applies_to` tags in admonitions<br>
154+
**Don't:** Add `applies_to` tags to general, broadly applicable content<br>
155+
**Don't:** Use `Coming (x.x.x)` tags, except in special cases (don't pre-announce features)
153156
<br>
154157
<br>
155158

@@ -177,12 +180,12 @@ elasticsearch.hosts: ["http://localhost:9200"]
177180
178181
179182
**DOs**<br>
180-
✅ Include code blocks within lists or other block elements as needed<br>
181-
✅ Add language identifiers like `yaml`, `json`, `bash`
183+
**Do:** Include code blocks within lists or other block elements as needed<br>
184+
**Do:** Add language identifiers like `yaml`, `json`, `bash`
182185

183186
**DON'Ts**<br>
184-
❌ Place code blocks in admonitions<br>
185-
❌ Use inline code formatting (single backticks) for multi-line content<br>
187+
**Don't:** Place code blocks in admonitions<br>
188+
**Don't:** Use inline code formatting (single backticks) for multi-line content
186189

187190
[More details: Code →](code.md)
188191
<br>
@@ -250,12 +253,12 @@ Add comments with `//` or `#` to magically create callouts.
250253
:::
251254

252255
**DOs**<br>
253-
✅ Keep callout text short and specific<br>
254-
✅ Use only one type of callout per code block (don't mix [explicit](#explicit-callout) and [magic](#magic-callout))<br>
255-
✅ Make sure there's a corresponding list item for each explicit callout marker in a code block
256+
**Do:** Keep callout text short and specific<br>
257+
**Do:** Use only one type of callout per code block (don't mix [explicit](#explicit-callout) and [magic](#magic-callout))<br>
258+
**Do:** Make sure there's a corresponding list item for each explicit callout marker in a code block
256259

257260
**DON'Ts**<br>
258-
❌ Overuse callouts -- they can impede readability<br>
261+
**Don't:** Overuse callouts &mdash; they can impede readability
259262

260263
[More details: Code callouts→](code.md#code-callouts)
261264
<br>
@@ -297,11 +300,11 @@ Regular text after multi-line comment
297300
:::
298301

299302
**DOs**<br>
300-
✅ Add a space after `%` to start a single-line comment<br>
303+
**Do:** Add a space after the `%` in single-line comments
301304

302305
**DON'Ts**<br>
303-
❌ Use `#` or `//` for comments; they're reserved for [magic callouts](#magic-callout)<br>
304-
306+
**Don't:** Use `#` or `//` for comments (reserved for [magic callouts](#magic-callout))
307+
<br>
305308
<br>
306309

307310
---
@@ -325,11 +328,11 @@ Collapsible content
325328
::::
326329

327330
**DOs**<br>
328-
✅ Use dropdowns for text, lists, images, code blocks, and tables<br>
329-
✅ Add `:open:` to auto-expand a dropdown by default
331+
**Do:** Use dropdowns for text, lists, images, code blocks, and tables<br>
332+
**Do:** Add `:open:` to auto-expand a dropdown by default
330333

331334
**DON'Ts**<br>
332-
❌ Use dropdowns for very long paragraphs or entire sections<br>
335+
**Don't:** Use dropdowns for very long paragraphs or entire sections
333336

334337
[More details: Dropdowns →](dropdowns.md)
335338
<br>
@@ -359,13 +362,13 @@ Title of a page or a section. To create a heading, add number signs `#` at the b
359362
::::
360363

361364
**DOs**<br>
362-
✅ Start every page with a Heading 1<br>
363-
✅ Use only one Heading 1 per page<br>
364-
✅ Define custom anchors for repeated headings<br>
365+
**Do:** Start every page with a Heading 1<br>
366+
**Do:** Use only one Heading 1 per page<br>
367+
**Do:** Define custom anchors for repeated headings
365368

366369
**DON'Ts**<br>
367-
❌ Use headings in tabs or dropdowns<br>
368-
❌ Go deeper than Heading 4
370+
**Don't:** Use headings in tabs or dropdowns<br>
371+
**Don't:** Go deeper than Heading 4
369372

370373
[More details: Headings →](headings.md)
371374
<br>
@@ -387,14 +390,14 @@ Standard Markdown images: `[alt text]` in square brackets, followed by the image
387390
:::
388391

389392
**DOs**<br>
390-
✅ Store images in a centralized directory<br>
391-
✅ Follow v3 [best practices for screenshots](../versions/index.md#screenshots)<br>
392-
✅ Specify `:screenshot:` in an [image directive](images.md#screenshots) to add a border<br>
393+
**Do:** Store images in a centralized directory<br>
394+
**Do:** Follow v3 [best practices for screenshots](../versions/index.md#screenshots)<br>
395+
**Do:** Specify `:screenshot:` in an [image directive](images.md#screenshots) to add a border
393396

394397
**DON'Ts**<br>
395-
❌ Use lots of UI screenshots that create a maintenance burden<br>
396-
❌ Include confidential info or PII in an image<br>
397-
❌ Add a drop shadow or torn edge effect
398+
**Don't:** Use lots of UI screenshots that create a maintenance burden<br>
399+
**Don't:** Include confidential info or PII in an image<br>
400+
**Don't:** Add a drop shadow or torn edge effect
398401

399402
[More details: Images →](images.md)
400403
<br>
@@ -410,14 +413,14 @@ Elastic Docs v3 supports standard Markdown inline formatting.
410413
`**strong**` &nbsp;&nbsp;&nbsp;**bold** <br>
411414
\` `monospace` \` &nbsp;&nbsp;&nbsp; `inline code` (single backticks) <br>
412415
`~~strikethrough~~` &nbsp;&nbsp;&nbsp; ~~strikethrough~~ <br>
413-
`\* escaped` &nbsp;&nbsp;&nbsp; \* escaped character <br>
416+
`\* escaped` &nbsp;&nbsp;&nbsp; \* escaped character
414417

415418
**DOs**<br>
416-
✅ Use `_emphasis_` to introduce a term<br>
417-
✅ Use inline `code` in headings and other elements as needed
419+
**Do:** Use `_emphasis_` to introduce a term<br>
420+
**Do:** Use inline `code` in headings and other elements as needed
418421

419422
**DON'Ts**<br>
420-
❌ Overuse `**strong**` or `_emphasis_` -- aim for readability
423+
**Don't:** Overuse `**strong**` or `_emphasis_` &mdash; aim for readability
421424
<br>
422425
<br>
423426

@@ -437,13 +440,13 @@ Standard Markdown links to doc pages, sections (anchors), or external content. P
437440
:::
438441

439442
**DOs**<br>
440-
✅ Use inline formatting in link text: `[**bold link**](bold-page.md)`<br>
441-
✅ Autogenerate link text from the page or section title: `[](use-title.md#section)`<br>
442-
✅ Define a custom [anchor](#anchors) by adding `[anchor-text]` at the end of a heading line
443+
**Do:** Use inline formatting in link text: `[**bold link**](bold-page.md)`<br>
444+
**Do:** Autogenerate link text from the page or section title: `[](use-title.md#section)`<br>
445+
**Do:** Define a custom [anchor](#anchors) by adding `[anchor-text]` at the end of a heading line
443446

444447
**DON'Ts**<br>
445-
❌ Use unclear, inaccessible link text like "click here" or "this"<br>
446-
❌ Include terminal punctuation in link text
448+
**Don't:** Use unclear, inaccessible link text like "click here" or "this"<br>
449+
**Don't:** Include terminal punctuation in link text
447450

448451
[More details: Links →](links.md)
449452
<br>
@@ -470,15 +473,15 @@ Standard Markdown ordered (numbered) and unordered (bulleted) lists. Indent with
470473
:::
471474
472475
**DOs** <br>
473-
✅ Add code blocks, images, admonitions, and other content within a list item<br>
474-
✅ Nest lists, mixing ordered and unordered as needed<br>
475-
✅ Use parallel structure and phrasing in list items<br>
476-
✅ Capitalize only the first word of list items (sentence case)<br>
477-
✅ Use terminal punctuation consistently and only for complete sentences<br>
476+
**Do:** Add code blocks, images, admonitions, and other content within a list item<br>
477+
**Do:** Nest lists, mixing ordered and unordered as needed<br>
478+
**Do:** Use parallel structure and phrasing in list items<br>
479+
**Do:** Capitalize only the first word of list items (sentence case)<br>
480+
**Do:** Use terminal punctuation consistently and only for complete sentences
478481
479482
**DON'Ts** <br>
480-
❌ Use lists solely for layout purposes <br>
481-
❌ Use lists for structured data or comparisons — use tables instead
483+
**Don't:** Use lists solely for layout purposes <br>
484+
**Don't:** Use lists for structured data or comparisons — use tables instead
482485
483486
[More details: Lists →](lists.md)
484487
<br>
@@ -516,14 +519,14 @@ Page title (Markdown H1):
516519

517520

518521
**DOs**<br>
519-
✅ Use active phrasing and shorter forms<br>
520-
✅ Make sure the navigation title clearly identifies the page topic<br>
521-
✅ Omit product names that appear in the full H1 page title
522+
**Do:** Use active phrasing and shorter forms<br>
523+
**Do:** Make sure the navigation title clearly identifies the page topic<br>
524+
**Do:** Omit product names that appear in the full H1 page title
522525

523526
**DON'Ts**<br>
524-
❌ Duplicate the H1 page title<br>
525-
❌ Use a long navigation title or lots of punctuation<br>
526-
❌ Abbreviate with periods or ellipses
527+
**Don't:** Duplicate the H1 page title<br>
528+
**Don't:** Use a long navigation title or lots of punctuation<br>
529+
**Don't:** Abbreviate with periods or ellipses
527530

528531
[More details: Title →](./titles.md)
529532
<br>
@@ -571,13 +574,13 @@ Elastic Cloud Hosted supports most standard Kibana settings.
571574
:::
572575

573576
**DOs** <br>
574-
✅ Check the global `docset.yml` file for existing product and feature name subs<br>
575-
✅ Use substitutions in code blocks by setting `subs=true` <br>
576-
✅ Define new page-specific substitutions as needed
577+
**Do:** Check the global `docset.yml` file for existing product and feature name subs<br>
578+
**Do:** Use substitutions in code blocks by setting `subs=true` <br>
579+
**Do:** Define new page-specific substitutions as needed
577580

578581
**DON'Ts**<br>
579-
❌ Override a `docset.yml` sub by defining a page-level sub with the same key (causes build errors)<br>
580-
❌ Use substitutions for common words that don't need to be standardized
582+
**Don't:** Override a `docset.yml` sub by defining a page-level sub with the same key (causes build errors)<br>
583+
**Don't:** Use substitutions for common words that don't need to be standardized
581584

582585
[More details: Substitutions →](./substitutions.md)
583586
<br>
@@ -620,16 +623,16 @@ Tab 2 content
620623
:::::
621624

622625
**DOs**<br>
623-
✅ Use clear, descriptive tab labels<br>
624-
✅ Make sure all tabs have the same type of content and similar goals<br>
625-
✅ Keep tab content scannable and self-contained (don't make the user switch tabs to follow steps or compare content)<br>
626-
✅ Include other block elements in tabs, like [admonitions](#admonitions)
626+
**Do:** Use clear, descriptive tab labels<br>
627+
**Do:** Make sure all tabs have the same type of content and similar goals<br>
628+
**Do:** Keep tab content scannable and self-contained (don't make users switch tabs to follow steps or compare content)<br>
629+
**Do:** Include other block elements in tabs, like [admonitions](#admonitions)
627630

628631
**DON'Ts**<br>
629-
❌ Nest tabs<br>
630-
❌ Split step-by-step procedures across tabs<br>
631-
❌ Use more than 6 tabs (use as few as possible)<br>
632-
❌ Use tabs in [dropdowns](#dropdowns)
632+
**Don't:** Nest tabs<br>
633+
**Don't:** Split step-by-step procedures across tabs<br>
634+
**Don't:** Use more than 6 tabs (use as few as possible)<br>
635+
**Don't:** Use tabs in [dropdowns](#dropdowns)
633636

634637

635638
[More details: Tabs →](tabs.md)
@@ -659,13 +662,13 @@ Standard table layout for structured data. Automatically scrolls horizontally if
659662
:::
660663

661664
**DOs**<br>
662-
✅ Use leading and trailing pipes for clarity<br>
663-
✅ Add spaces for readability (they're trimmed)<br>
664-
✅ Keep cell content scannable and parallel<br>
665-
✅ Use standard Markdown text alignment when necessary (`:-- --: :--:`)<br>
665+
**Do:** Use leading and trailing pipes for clarity<br>
666+
**Do:** Add spaces for readability (they're trimmed)<br>
667+
**Do:** Keep cell content scannable and parallel<br>
668+
**Do:** Use standard Markdown text alignment when necessary (`:-- --: :--:`)
666669

667670
**DON'Ts**<br>
668-
❌ Insert block elements or multiple paragraphs in a table cell<br>
669-
❌ Use a table solely for position or spacing purposes<br>
671+
**Don't:** Insert block elements or multiple paragraphs in a table cell<br>
672+
**Don't:** Use a table solely for position or spacing purposes
670673

671674
[More details: Tables →](tables.md)

0 commit comments

Comments
 (0)