Skip to content

Commit

Permalink
Touchup markup guide to better reflect current feature set (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored Dec 17, 2024
1 parent 880b7b1 commit 3311063
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 158 deletions.
4 changes: 2 additions & 2 deletions docs/source/markup/admonitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ Here is a tip.

## Collapsible admonitions

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

```{note}
:class: dropdown
:open:
Longer content can be collapsed to take less space.
Expand Down
1 change: 1 addition & 0 deletions docs/source/markup/applies.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Are equivalent, note `all` just means we won't be rendering the version portion


## This section has its own applies annotations

:::{applies}
:stack: unavailable
:serverless: tech-preview
Expand Down
36 changes: 0 additions & 36 deletions docs/source/markup/cards_grids.md

This file was deleted.

18 changes: 18 additions & 0 deletions docs/source/markup/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,21 @@ We can use the `figure-md` directive to add caption to an image.
This is a caption in **Markdown**
```



```{directive} arguments
:option: value
# hello world
[a link](https://www.google.com] with **bold** text
```



:::{directive} arguments
:option: value

# hello world
[a link](https://www.google.com] with **bold** text
:::
63 changes: 0 additions & 63 deletions docs/source/markup/notebook.ipynb

This file was deleted.

21 changes: 0 additions & 21 deletions docs/source/markup/rst.rst

This file was deleted.

17 changes: 0 additions & 17 deletions docs/source/markup/rst_in_markdown.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/markup/sundries.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ Here is a quote. The attribution is added using the block attribute `attribution
{attribution="Hamlet act 4, Scene 5"}
> We know what we are, but know not what we may be.
## Task lists

- [ ] An item that needs doing
- [x] An item that is complete

## Line breaks

You can break a paraghraph \
Expand Down
7 changes: 3 additions & 4 deletions docs/source/markup/yaml_to_markdown.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: Kibana Configuration
title: Generate Settings References
navigation_title: Settings References
---


```{yaml-to-md}
:yaml: _static/yaml/settings.yaml
:template: _static/templates/settings.jinja
```{settings} /elastic/reference/kibana-alerting-action-settings.yml
```
13 changes: 3 additions & 10 deletions src/Elastic.Markdown/Myst/Directives/AdmonitionBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,13 @@ public string Title

public override void FinalizeAndValidate(ParserContext context)
{
Classes = Properties.GetValueOrDefault("class");
CrossReferenceName = Properties.GetValueOrDefault("name");
DropdownOpen = PropBool("open");
if (DropdownOpen.HasValue)
Classes = "dropdown";
}
}


public class DropdownBlock(DirectiveBlockParser parser, Dictionary<string, string> properties, ParserContext context)
: AdmonitionBlock(parser, "admonition", properties, context)
{
// ReSharper disable once RedundantOverriddenMember
public override void FinalizeAndValidate(ParserContext context)
{
base.FinalizeAndValidate(context);
Classes = $"dropdown {Classes}";
}
}
: AdmonitionBlock(parser, "admonition", properties, context);

0 comments on commit 3311063

Please sign in to comment.