Skip to content

Commit 3311063

Browse files
authored
Touchup markup guide to better reflect current feature set (#115)
1 parent 880b7b1 commit 3311063

File tree

10 files changed

+27
-158
lines changed

10 files changed

+27
-158
lines changed

docs/source/markup/admonitions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ Here is a tip.
4646

4747
## Collapsible admonitions
4848

49-
You can use `:class: dropdown` to make an admonition collapsible.
49+
You can use `:open: <bool>` to make an admonition collapsible.
5050

5151
```{note}
52-
:class: dropdown
52+
:open:
5353
5454
Longer content can be collapsed to take less space.
5555

docs/source/markup/applies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Are equivalent, note `all` just means we won't be rendering the version portion
4949

5050

5151
## This section has its own applies annotations
52+
5253
:::{applies}
5354
:stack: unavailable
5455
:serverless: tech-preview

docs/source/markup/cards_grids.md

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

docs/source/markup/images.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,21 @@ We can use the `figure-md` directive to add caption to an image.
3737
3838
This is a caption in **Markdown**
3939
```
40+
41+
42+
43+
```{directive} arguments
44+
:option: value
45+
46+
# hello world
47+
[a link](https://www.google.com] with **bold** text
48+
```
49+
50+
51+
52+
:::{directive} arguments
53+
:option: value
54+
55+
# hello world
56+
[a link](https://www.google.com] with **bold** text
57+
:::

docs/source/markup/notebook.ipynb

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

docs/source/markup/rst.rst

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

docs/source/markup/rst_in_markdown.md

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

docs/source/markup/sundries.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ Here is a quote. The attribution is added using the block attribute `attribution
2525
{attribution="Hamlet act 4, Scene 5"}
2626
> We know what we are, but know not what we may be.
2727
28-
## Task lists
29-
30-
- [ ] An item that needs doing
31-
- [x] An item that is complete
32-
3328
## Line breaks
3429

3530
You can break a paraghraph \
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
title: Kibana Configuration
2+
title: Generate Settings References
3+
navigation_title: Settings References
34
---
45

56

6-
```{yaml-to-md}
7-
:yaml: _static/yaml/settings.yaml
8-
:template: _static/templates/settings.jinja
7+
```{settings} /elastic/reference/kibana-alerting-action-settings.yml
98
```

src/Elastic.Markdown/Myst/Directives/AdmonitionBlock.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,13 @@ public string Title
3333

3434
public override void FinalizeAndValidate(ParserContext context)
3535
{
36-
Classes = Properties.GetValueOrDefault("class");
3736
CrossReferenceName = Properties.GetValueOrDefault("name");
3837
DropdownOpen = PropBool("open");
38+
if (DropdownOpen.HasValue)
39+
Classes = "dropdown";
3940
}
4041
}
4142

4243

4344
public class DropdownBlock(DirectiveBlockParser parser, Dictionary<string, string> properties, ParserContext context)
44-
: AdmonitionBlock(parser, "admonition", properties, context)
45-
{
46-
// ReSharper disable once RedundantOverriddenMember
47-
public override void FinalizeAndValidate(ParserContext context)
48-
{
49-
base.FinalizeAndValidate(context);
50-
Classes = $"dropdown {Classes}";
51-
}
52-
}
45+
: AdmonitionBlock(parser, "admonition", properties, context);

0 commit comments

Comments
 (0)