Home Explore Blog CI



kubernetes

5th chunk of `content/en/docs/test.md`
792ef97b7a71439b1baddc1b3773cacf2de416399d5ed87d0000000100000c48
Markdown tables have a hard time with block-level elements within cells, such as
list items, code blocks, or multiple paragraphs. For complex or very wide
tables, use HTML instead.

```html
<table>
<thead>
  <tr>
    <th>Heading cell 1</th>
    <th>Heading cell 2</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Body cell 1</td>
    <td>Body cell 2</td>
  </tr>
</tbody>
</table>
```

Produces:

<table>
<thead>
  <tr>
    <th>Heading cell 1</th>
    <th>Heading cell 2</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Body cell 1</td>
    <td>Body cell 2</td>
  </tr>
</tbody>
</table>

## Visualizations with Mermaid

You can use [Mermaid JS](https://mermaidjs.github.io) visualizations.
The Mermaid JS version is specified in [/layouts/partials/head.html](https://github.com/kubernetes/website/blob/main/layouts/partials/head.html)

```markdown
{{</* mermaid */>}}
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
{{</*/ mermaid */>}}
```

Produces:

{{< mermaid >}}
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
{{</ mermaid >}}

```markdown
{{</* mermaid */>}}
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?
{{</*/ mermaid */>}}
```

Produces:

{{< mermaid >}}
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?
{{</ mermaid >}}

You can check more [examples](https://mermaid-js.github.io/mermaid/#/examples) from the official docs.

## Sidebars and Admonitions

Sidebars and admonitions provide ways to add visual importance to text. Use
them sparingly.

### Sidebars

A sidebar offsets text visually, but without the visual prominence of
[admonitions](#admonitions).

> This is a sidebar.
>
> You can have paragraphs and block-level elements within a sidebar.
>
> You can even have code blocks.
>
> ```bash
> sudo dmesg
> ```

### Admonitions

Admonitions (notes, warnings, etc) use Hugo shortcodes.

{{< note >}}
Notes catch the reader's attention without a sense of urgency.

You can have multiple paragraphs and block-level elements inside an admonition.

You can also add tables to organize and highlight key information.

| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Data 1   | Data A   | Info X   |
| Data 2   | Data B   | Info Y   |
{{< /note >}}

{{< caution >}}
The reader should proceed with caution.
{{< /caution >}}

{{< warning >}}
Warnings point out something that could cause harm if ignored.
{{< /warning >}}

## Includes

To add shortcodes to includes.

{{< note >}}
{{< include "task-tutorial-prereqs.md" >}}
{{< /note >}}

## Katacoda Embedded Live Environment

{{< kat-button >}}

Title: Advanced Markdown Features: Mermaid Visualizations, Sidebars, Admonitions, Includes, and Katacoda Integration
Summary
This section covers advanced Markdown features, including using HTML for complex tables, integrating Mermaid JS for creating visualizations (with examples and a link to the official documentation), implementing sidebars and admonitions to highlight text, including other files via shortcodes, and embedding a live Katacoda environment.