diff --git a/.changeset/modern-flies-joke.md b/.changeset/modern-flies-joke.md new file mode 100644 index 000000000..70f245b42 --- /dev/null +++ b/.changeset/modern-flies-joke.md @@ -0,0 +1,6 @@ +--- +"myst-directives": minor +"myst-spec-ext": minor +--- + +Add topic directive diff --git a/docs/asides.md b/docs/asides.md index 37586949b..4b43e0a26 100644 --- a/docs/asides.md +++ b/docs/asides.md @@ -6,7 +6,7 @@ description: Asides provide an easy way to represent content that is only indire Asides provide an easy way to represent content that is only indirectly related to the article's main content. Where supported, MyST will attempt to display an {myst:directive}`aside` _as close as possible_ but separately from the main article, such as in the side-margin. -```{aside} +```{aside} Margin Content Here’s some margin content! It was created by using the {myst:directive}`margin` directive in a Markdown, we can include images: ![](https://source.unsplash.com/random/400x75?sunset) @@ -14,11 +14,11 @@ Here’s some margin content! It was created by using the {myst:directive}`margi or any other sort of content! ``` -````markdown -```{aside} +```markdown +:::{aside} An Optional Title This is an aside. It is not entirely relevant to the main article. +::: ``` -```` You can also refer to this directive using {myst:directive}`margin` or {myst:directive}`sidebar`, which will have slightly different classes applied in the future. @@ -29,3 +29,21 @@ Many of the features on this page are experimental and may change at any time. These elements can conflict with the document outline when they are both competing for the margin space (see [#170](https://github.com/executablebooks/myst-theme/issues/170)). ::: + +% Using bold here, until we fix #170 + +**Topics** + +A topic is like a block quote with a title, or a self-contained section. +Use the "topic" directive to indicate a self-contained idea that is separate from the flow of the document. +Semantically, this is an `