Here you can find examples of style and formatting elements that you can use in your pages.

Note:
% is used when the inner content of the shortcode is markdown, and < is used when the inner content is HTML.

Basic content formatting

Tabbed paragraphs

A tabbed paragraph create scrolling code blocks like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris efficitur, velit sit amet tempus commodo, orci ipsum laoreet turpis, eu ullamcorper orci enim ut dui.

A tabbed paragraph in a bulleted or numbered list create indented paragraphs like this:

  • Lorem

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris efficitur, velit sit amet tempus commodo, orci ipsum laoreet turpis, eu ullamcorper orci enim ut dui.

To link to another page in the content directory:

Syntax:

[Redis Cloud Quick Start]({{< relref  "/rc/rc-quickstart.md" >}})`

Output:

Redis Cloud Quick Start

To link to an anchor on another page in the content directory:

Syntax:

`[Sign up for Redis Cloud]({{< relref "/rc/rc-quickstart#step-1-sign-up-for-redis-cloud-pro-account" >}})`

Output:

Sign up for Redis Cloud

Text formatting

Text styles

Style Syntax Output
Emphasized text *emphasized* emphasized
Bold text **bold** bold

Comments

Text in the comments shortcode is not published in the output.

Syntax:

{{% comment %}}Do not publish!{{% /comment %}}

Ouput:

Definitions

A series of definitions, as you’d find in a glossary, should go into a definition list (e.g., <dl></dl>).

For the entires, use the following shortcode:

{{<definition "term">}}
The definition of "term" goes here.
{{</definition>}}

This produces the following HTML output:

<dt id="term">term</dt>
<dd>The definition of "term" goes here.</dd>

Code formatting

Embedded code snippets

Code snippets that need to pass automation must be located in /static/code and included in the article with:

```json
{{</* embed-code "sample.json" >}}
```

If the code snippet is more than 30 lines, add it within an expanding block:

{{% expand %}}
```json
{{< embed-code "sample.json" >}}
```
{{% /expand %}}

Code blocks

To add code blocks of a specific language, e.g. python, type this:

```python

##this is python code

def hello_world():

  print "Hello World!"

```

Output:

##this is python code

def hello_world():
  print "Hello World!"

Inline Code

To indicate text entry, commands or code paramters inline use a single backtick (``).

Syntax:

Use the `TRUE` value to enable the feature.

Output:

Use the TRUE value to enable the feature.

Code shortcode

Code can be shown like code fences using the code shortcode also.

Syntax:

{{< code >}}var x = 123;{{< /code >}}

Ouput:

var x = 123;

Tables

Syntax:

| heading 1 | heading 2 | heading 3 |
| :-----| :-----: |-----: |
| cell 1x1  | cell 1x2  | cell 1x3  |
| cell 2x1  | cell 2x2  | cell 2x3  |

Ouput:

heading 1 heading 2 heading 3
cell 1x1 cell 1x2 cell 1x3
cell 2x1 cell 2x2 cell 2x3

Tables from CSV

The first parameter when using this shortcode is the name of the CSV file located in /static/tables directory and the second is the number of columns in the table.

Syntax: {{< table-csv "test_table.csv" 3 >}}

File:

Name,Description,Detail
cell 1x1,cell 1x2,cell 1x3
cell 2x1,cell 2x2,cell 2x3
cell 3x1,cell 3x2,cell 3x3

Output:

Name Description Detail
cell 1x1 cell 1x2 cell 1x3
cell 2x1 cell 2x2 cell 2x3
cell 3x1 cell 3x2 cell 3x3

Tabs

Source: https://github.com/rvanhorn/hugo-dynamic-tabs

Syntax:

{{% tabs tabTotal="3" tabID="1" tabName1="Tab 1" tabName2="Tab 2" tabName3="Tab 3" %}}
  {{% tab tabNum="1" %}}

  Tab 1 Content

  {{% /tab %}}
  {{% tab tabNum="2" %}}

  Tab 2 Content

  {{% /tab %}}
  {{% tab tabNum="3" %}}

  Tab 3 Content

  {{% /tab %}}
{{% /tabs %}}

Output:

Tab 1 Content
Content in the first tab
Tab 2 Content
Tab 3 Content

Images and videos

Adding an image

  1. Copy the image to a directory in: /static/images
  2. In the markdown page, add the alt text and path to the image like this:

Syntax:

`![Alt text]( /images/path/image.png )`

Output:

![Redis Enterpise Cluster]( /images/rs/rp_stack.png ) shows:

Redis Enterrpise Cluster

To make an image appear on the next line in a list:

  1. Write your instruction.
  2. Add 2 spaces at the end of the line and put the image on the next line with a tab indentation. Redis Enterrpise Cluster

Adding a video

Embed a local video

To embed a video, use the video shortcode with the location of the video and a video title.

{{< video "/images/<path>/<video>.mp4" "Video title" >}}

YouTube

Embed YouTube video.

Syntax:

{{< youtube Bi1T3toQfF4 >}}

Ouput:

Youtube with start time

Embed YouTube video and start playback from specific timestamp.

Syntax:

{{< youtube_start Bi1T3toQfF4 10 >}}

Ouput:

Single-sourcing

Expanding blocks

Syntax:

{{< expand "How do you make expanding blocks?" >}}
This is how you make expanding blocks.
{{< /expand >}}

Output:

How do you make expanding blocks?

Embedded partials

A partial markdown or HTML file can be included in other files using the embed-md or embed-html shortcodes. Partials must be placed in content/embeds directory.

Embed a markdown partial

Syntax:

{{< excerpt >}}The Redis OSS Cluster API support in Redis Enterprise Software (RS)
provides a simple mechanism for cluster-aware Redis clients to learn
and know the cluster topology. This enables clients to connect directly
to an RS proxy on the node hosting the master shard for the data being
operated on.{{< /excerpt >}}

Output:

The Redis OSS Cluster API support in Redis Enterprise Software (RS) provides a simple mechanism for cluster-aware Redis clients to learn and know the cluster topology. This enables clients to connect directly to an RS proxy on the node hosting the master shard for the data being operated on.

Embed an HTML partial

Syntax:

{{< excerpt-include filename="rs/clusters/optimize/oss-cluster-api.md" >}}

Output:

Excerpts

Warning -
In most cases, use embedded partials instead of excerpts.

Defining an excerpt

Syntax:

{{% excerpt %}}The Redis OSS Cluster API support in Redis Enterprise Software (RS)
provides a simple mechanism for cluster-aware Redis clients to learn
and know the cluster topology. This enables clients to connect directly
to an RS proxy on the node hosting the master shard for the data being
operated on.{{% /excerpt %}}

Output:

The Redis OSS Cluster API support in Redis Enterprise Software (RS)

provides a simple mechanism for cluster-aware Redis clients to learn and know the cluster topology. This enables clients to connect directly to an RS proxy on the node hosting the master shard for the data being operated on.

Including an excerpt

Syntax:

{{% excerpt-include filename="rs/clusters/optimize/oss-cluster-api.md" %}}

Output:

Informative notices

Info

Info boxes give background information that does not prevent proper use of the product.

Syntax:

{{< info >}}After you do this the first time, it gets easier.{{< /info >}}

Ouput:

FYI -
After you do this the first time, it gets easier.

Tip

Tips give additional information for improved use of the product.

Syntax:

{{< tip */%}}Eating on time prevents hunger.{{</* /tip >}}

Ouput:

Tip -
Eating on time prevents hunger.

Note

Notes suggest steps that prevent errors that do not cause data loss.

Syntax:

{{< note >}}Make sure you have enough disk space.{{< /note >}}

Ouput:

Note:
Make sure you have enough disk space.

Warning

Warnings suggest that users think carefully before doing steps that can cause irresversible data loss.

Syntax:

{{< warning >}}Backup your data before erasing the hard disk!{{< /warning >}}

Ouput:

Warning -
Backup your data before erasing the hard disk!

Label (Not used)

Label displays a label. The type parameter can be passed to the shortcode in order to display the label in a different color, eg. success for a green label, warning for orange, info for blue and danger for red.

Syntax:

{{< label type="info" >}}This is a label{{< /label >}}

Ouput:

This is a label

Well

Well displays content inside a container.

Syntax:

{{< well >}} Inside a well {{< /well >}}

Ouput:

Inside a well

Contents lists

All children

Allchildren displays all the child pages of current page.

Syntax:

{{< allchildren style="h2" description="true" >}}

Ouput:

See example here.

Recently updated

This shortcode can be used to display recently updated articles.

Syntax:

{{< recently-updated >}} Recently updated articles {{< /recently-updated >}}

Ouput:

Recently updated articles
  • RedisInsight v2.30.0, July 2023
  • RedisInsight v2.28.0, June 2023
  • RedisInsight v2.26.0, May 2023
  • RedisInsight v2.24.0, April 2023
  • RedisInsight v2.22.1, March 2023
  • RedisInsight v2.20.0, February 2023
  • RedisInsight v2.18.0, January 2023
  • Redis Stack quick start
  • Redis Enterprise Software quickstart
  • RedisInsight v2.16.0, December 2022
  • Other shortcodes

    For more info about editing and writing our documents: