# Are there short-codes in Jekyll?

**URL:** <https://talk.jekyllrb.com/t/are-there-short-codes-in-jekyll/2910>\
**Category:** Help\
**Created:** [May 15, 2019, 1:50am UTC](https://talk.jekyllrb.com/t/are-there-short-codes-in-jekyll/2910 "2019-05-15T01:50:00Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [May 15, 2019, 8:17pm UTC](https://talk.jekyllrb.com/t/are-there-short-codes-in-jekyll/2910/3 "2019-05-15T20:17:35Z")

</div>

There are several ways to achieve this:

Use [Jekyll `_includes`](https://jekyllrb.com/docs/includes/) along with parameters. Simple example would be to style an alert block.

```auto
<!-- /_includes/alert.html -->

<div class="alert alert-info" role="alert">
  {{ include.content }}
</div>

```

And you’d use it in your content like so:

```auto

Some content here.

{% include alert.html content="Your alert text" %}

Some more content.

```

Write a custom [Jekyll tag](https://jekyllrb.com/docs/plugins/tags/) (aka a plugin). This would be similar to the include method above but you you’d have something like:

```auto
{% alert %}
Your alert content here.
{% endalert %}

```

Or you can [Augment Kramdown](https://kramdown.gettalong.org/syntax.html#inline-attribute-lists) written Markdown with selectors to apply CSS classes to a block of text styling it however you need.

```markdown
Your alert text
{: .alert .alert-info}

```

---

_[View the full topic](https://talk.jekyllrb.com/t/are-there-short-codes-in-jekyll/2910)._
