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

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 Pro Quick Setup]({{< relref  "/rv/quick-setup.md" >}})`

Output:

Redis Cloud Pro Quick Setup

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

Syntax:

`[Sign up for Redis Cloud Pro]({{< relref "/rv/quick-setup.md#step-1-sign-up-for-redis-cloud-pro-account" >}})`

Output:

Sign up for Redis Cloud Pro

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:

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 displayed 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

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?

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/concepts/data-access/oss-cluster-api.md" %}}

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.

Embedding a partial

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

Embed a markdown partial

Syntax:

{{< embed-md "sample.md"  >}}

Output:

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

Embed an HTML partial

Syntax:

{{< embed-html "sample-table.html" >}}

Output:

this is a sample embed test

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

  • Creating a Cloud Account
  • Installing the Setup Package
  • Quick Setup of Redis Cloud Essentials
  • Quick Setup of Redis Cloud Pro
  • Quick Setup of Redis Enterprise Software (RS)
  • Redis Enterprise Software (RS)
  • Securing Your Database
  • The Technology Behind Redis Enterprise Software (RS)
  • Concepts behind Redis Cloud Essentials
  • Quick Start Tutorials
  • Other Shortcodes