mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-06 04:01:22 -06:00
This PR combines (and resolves conflicts between) #448, #463, #466, #494, #495, #496, #498, and #572. The main aim is to facilitate use of several of the implemented features _together_, when using the fork as a remote theme. It should also simplify merging the included PRs into a future release. The branch [combination-rec-nav](https://github.com/pdmosses/just-the-docs/tree/combination-rec-nav) adds [multi-level navigation](https://github.com/pmarsceill/just-the-docs/pull/462) and (NEW:) [sibling links](https://github.com/pmarsceill/just-the-docs/pull/394) to the branch used for this PR. It includes updated [documentation for the navigation structure](https://pdmosses.github.io/just-the-docs/docs/navigation-structure/), and reorganised and extended [navigation tests](https://pdmosses.github.io/just-the-docs/tests/navigation/). The documentation and the tests can be browsed at the (temporary) [website published from the combination-rec-nav branch](https://pdmosses.github.io/just-the-docs/). _Caveat:_ The changes to v0.3.3 in this PR and #462 have not yet been reviewed or approved, and may need updating before merging into a release of the theme. If you use a branch from a PR as a remote theme, there is a risk of such updates affecting your website. Moreover, these branches are likely to be deleted after they have been merged. To avoid such problems, you could copy the branch that you want to use to your own fork of the theme. Co-authored-by: Matt Wang <matt@matthewwang.me>
105 lines
1.8 KiB
Markdown
105 lines
1.8 KiB
Markdown
---
|
|
layout: default
|
|
title: Callouts
|
|
parent: UI Components
|
|
nav_order: 7
|
|
---
|
|
|
|
# Callouts
|
|
|
|
Markdown does not include support for callouts. However, you can style text as a callout using a Markdown extension supported by kramdown: [*block IALs*](https://kramdown.gettalong.org/quickref.html#block-attributes).
|
|
|
|
Common kinds of callouts include `admonition`, `attention`, `caution`, `danger`, `error`, `hint`, `important`, `note`, `tip`, and `warning`.
|
|
|
|
When you have [configured]({{ site.baseurl }}{% link docs/configuration.md %}#callouts) the `color` and (optional) `title` for a callout, you can apply it to a paragraph, or to a block quote with several paragraphs, as illustrated below.[^postfix]
|
|
|
|
[^postfix]:
|
|
You can put the callout markup either before or after its content.
|
|
|
|
#### An untitled callout
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
{: .highlight }
|
|
A paragraph
|
|
```
|
|
|
|
#### A single paragraph callout
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
{: .note }
|
|
A paragraph
|
|
```
|
|
|
|
```markdown
|
|
{: .note-title }
|
|
> My note title
|
|
>
|
|
> A paragraph with a custom title callout
|
|
```
|
|
|
|
#### A multi-paragraph callout
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
{: .important }
|
|
> A paragraph
|
|
>
|
|
> Another paragraph
|
|
>
|
|
> The last paragraph
|
|
```
|
|
|
|
```markdown
|
|
{: .important-title }
|
|
> My important title
|
|
>
|
|
> A paragraph
|
|
>
|
|
> Another paragraph
|
|
>
|
|
> The last paragraph
|
|
```
|
|
|
|
#### An indented callout
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
> {: .hint }
|
|
A paragraph
|
|
```
|
|
|
|
#### Indented multi-paragraph callouts
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
> {: .attention }
|
|
> > A paragraph
|
|
> >
|
|
> > Another paragraph
|
|
> >
|
|
> > The last paragraph
|
|
```
|
|
|
|
#### Nested callouts
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
{: .important }
|
|
> {: .warning }
|
|
> A paragraph
|
|
```
|
|
|
|
#### Opaque background
|
|
{: .no_toc }
|
|
|
|
```markdown
|
|
{: .important }
|
|
> {: .opaque }
|
|
> <div markdown="block">
|
|
> {: .warning }
|
|
> A paragraph
|
|
> </div>
|
|
```
|