<article class="article <%= index ? 'article--excerpt' : '' %>">

    <header>
        <% if (index){ %>
            <h2 class="article__title">
                <a href="<%- url_for(post.path) %>"><%= post.title %></a>
            </h2>
        <% } else { %>
            <h1 class="article__title"><%= post.title %></h1>
        <% } %>
        <div class="article__meta">
            <p>Published: <%- partial('component/date', {datetime: post.date}) %></p>
            <p>Last updated: <%- partial('component/date', {datetime: post.updated}) %></p>
        </div>
    </header>

    <div class="article__content">
        <% if (post.excerpt && index){ %>
            <div>
                <%- post.excerpt %>
            </div>
            <a href="<%- url_for(post.path) %>">Read '<%= post.title %>'</a>
        <% } else { %>
            <div>
                <%- post.content %>
            </div>
        <% } %>
    </div>

</article>
