Skip to content

Commit

Permalink
Fix HTML5 compatibility (#234)
Browse files Browse the repository at this point in the history
- fixed date stamps to be HTML5 valid
- add `itemscope` to `<article>`

What I ommitted, but may need to fix later, if HTML5 hasn’t
included it yet:

- remove: `<meta name="copyright" content="{{ AUTHOR }}" />`
  • Loading branch information
silverhook authored and talha131 committed Feb 10, 2019
1 parent 2fc7678 commit 269535f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ <h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% endif %}

{% if loop.last %}
<article class="last-entry-of-year">
<article itemscope class="last-entry-of-year">
{% else %}
{% set next_year = loop.nextitem.date.strftime('%Y') %}

{% if next_year != year %}
<article class="last-entry-of-year">
<article itemscope class="last-entry-of-year">
{% else %}
<article>
<article itemscope>
{% endif %}
{% endif %}

<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
</article>
{% endfor %}
</div>
Expand Down

0 comments on commit 269535f

Please sign in to comment.