<!– dynamically fixing the title for tag/author pages –> {% if page.url %}

{% if page.url contains "tag/" %}
    {% assign title = page.url | remove: 'tag' | remove: '/' | url_decode | replace: '-', ' ' | capitalizeall %}
{% elsif page.url contains "author/" %}
    {% assign username = page.url | remove: 'author' | remove: '/' | replace: '-', ' ' | remove: ' ' %}
    {% for author in site.data.authors %}
        {% if author[1].username == username %}
            {% assign title = author[1].name %}
        {% endif %}
    {% endfor %}
{% endif %}

{% endif %} {% if title %}

{% assign title = title | append: ' - ' | append: site.title  %}

{% endif %}