You can create objects that take parameters. This is not exactly a macro, but it is what I have successfully used on GitHub pages.
For more information and tips on managing the inclusion and use of parameters, see the Jekyll documentation .
:
_includes/email_link.html
<a href="mailto:{{ include.user.email_address }}"
title="Email {{ include.user.name }}">
<i class="fa fa-fw fa-envelope"></i>
</a>
about.md
---
layout: page
title: About
---
{% include email_link.html user=site.users.erik %}
_config.yml
users:
erik:
name: Erik
email_address: erik.gillespie@wizbang.com