Create a Jekyll button variable

Create a Jekyll button variable

In this tutorial I will explain how to create inline variables in Jekyll.


Create

In the /_includes folder, create a file named button.html with this content:

<a href="{{ include.url }}" class="btn btn-primary">{{ include.label }}</a>

Usuage

Use it around the projekt like this:

{% include button.html label="Button Text" url="https://444.hu" %}

Source

How to build customizable HTML widgets in Jekyll


Add Comment

Comment submitted

Thanks! Your comment will appear shortly. Please reload the page.


Tags