
jekyll-callout
A Jekyll plugin that adds a callout Liquid block tag for styled callout and admonition blocks with Markdown inside.
jekyll-callout is a Jekyll plugin for adding styled callout and admonition blocks to any page with a simple Liquid block tag. Whatever you put inside the block renders as Markdown.
Demo
This is a note callout. You can use full Markdown inside, including links, bold, and code.
Use the tip type for tips and best practices.
This is a warning with a custom title. Double-check your configuration before pushing to production.
This is a danger callout. Use it for critical warnings.
This is an info callout. Good for extra context.
{% callout note %}
This is a **note** with Markdown support.
{% endcallout %}
{% callout warning "Before You Deploy" %}
Check your configuration before pushing.
{% endcallout %}
Why This Exists
Raw HTML <div> blocks in Markdown are wordy and they break easily. I’d much rather write a callout tag. It’s easier to read and maintain, and my content files stay about the content.
Source Code
- GitHub: github.com/jchance/jekyll-callout
- RubyGems: rubygems.org/gems/jekyll-callout
Installation
Add to your Gemfile:
gem "jekyll-callout", "~> 0.1"
Add to _config.yml:
plugins:
- jekyll-callout
Then run bundle install.
Usage
Basic:
{% callout note %}
Your content here with **Markdown** support.
{% endcallout %}
With custom title:
{% callout warning "Heads Up" %}
Something important to know.
{% endcallout %}
Supported types: note, tip, warning, danger, info
Output HTML
<div class="callout callout--warning">
<div class="callout__title">Warning</div>
<div class="callout__body">
<p>Something important to know.</p>
</div>
</div>
Styling
The plugin outputs unstyled markup with BEM class names and doesn’t inject any styles. Add these to your site’s CSS:
.callout {
padding: 1rem 1.25rem;
border-left: 4px solid #ccc;
margin-bottom: 1.5rem;
background: #f9f9f9;
}
.callout--note { border-color: #5b8dee; background: #eef3fd; }
.callout--tip { border-color: #28a745; background: #eafaf1; }
.callout--warning { border-color: #ffc107; background: #fffbea; }
.callout--danger { border-color: #dc3545; background: #fdf2f2; }
.callout--info { border-color: #17a2b8; background: #e8f7f9; }
.callout__title { font-weight: bold; margin-bottom: 0.4rem; }

