{% macro render_link(res, class=None) %}
{% refer to res.relative_path as post %}
{{ res.meta.title }}
{% endmacro %}
{% macro render_excerpt(res, class=None) %}
{% refer to res.relative_path as post %}
{{ post.image|markdown|typogrify }}
{{ post.excerpt|markdown|typogrify }}
{% endmacro %}
{% macro render_nav(menu, cls=None) -%}
{% if menu -%}
{% for item in menu -%}
{% set active = False -%}
{% if item.type == 'page' -%}
{% set active = (resource.url ==
site.content.resource_from_relative_path(item.url).url) -%}
{% else -%}
{% set active = (node ==
site.content.node_from_relative_path(item.url)) -%}
{%- endif %}
{% set classes = ['button', 'white'] -%}
{% do classes.append('active') if active -%}
{% do classes.append(item.css_class) if item.css_class -%}
{{ item.name }}
{%- endfor %}
{%- endif %}
{%- endmacro %}