Shortcodes

Available shortcodes for embedding content in your documentation

JuicyDocs includes several shortcodes to enhance your documentation with rich content.

Alert

Display alert boxes with different styles. Useful for warnings, tips, and important information.

Usage

{% alert "This is an info message", "info" %}
{% alert "Warning! Be careful", "warning", "Heads up" %}

Types

### With Title ### Multi-line Content

For longer content, use the paired alertAlt shortcode:

{% alertAlt "info", "Pro Tip" %}
This is a longer alert with multiple lines.

You can include **markdown** formatting here.
{% endalertAlt %}

YouTube (Lazy Loading)

The youtube shortcode uses lite-youtube-embed for fast, lazy-loading YouTube embeds. The video thumbnail loads immediately, but the full player only loads when clicked.

Usage

{% youtube "dQw4w9WgXcQ" %}
{% youtube "https://www.youtube.com/watch?v=dQw4w9WgXcQ" %}
{% youtube "https://youtu.be/dQw4w9WgXcQ", "Never Gonna Give You Up" %}

You can pass either:

  • Just the video ID: dQw4w9WgXcQ
  • Full YouTube URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • Short URL: https://youtu.be/dQw4w9WgXcQ

Example

Another Example


Embed

Embed external content via iframe (YouTube, CodePen, etc.). YouTube URLs are automatically converted to youtube-nocookie.com for privacy.

Usage

{% embed "https://www.youtube.com/embed/dQw4w9WgXcQ" %}
{% embed "https://www.youtube.com/embed/dQw4w9WgXcQ", "400" %}

Example