Skip to content

Commit

Permalink
Fix itemprop errors from w3c validator in jinja themes (#2994)
Browse files Browse the repository at this point in the history
* Fix itemprop errors from w3c validator

https://validator.w3c.org flags itemprop attributes as an error
on any element that specifies them unless the itemtype attribute
in a parent element references a valid schema. The validation
error is:

"Error: the itemprop attribute was specified but the element is
 not a property of any item"

This change fixes the validation error.

* Add changelog entry

* jinja → default
  • Loading branch information
edwinsteele authored and ralsina committed Mar 21, 2018
1 parent 76ff6bf commit 3fe69a4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -38,6 +38,7 @@ Features
Bugfixes
--------

* Fix w3c validation errors for itemscope entries in default themes
* Hide “Incomplete language” message for overrides of complete
languages
* Handle '/' and other absolute paths better in POSTS / PAGES / TRANSLATIONS
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base-jinja/templates/index.tmpl
Expand Up @@ -26,7 +26,7 @@
{% endif %}
<div class="postindex">
{% for post in posts %}
<article class="h-entry post-{{ post.meta('type') }}">
<article class="h-entry post-{{ post.meta('type') }}" itemscope="itemscope" itemtype="http://schema.org/Article">
<header>
<h1 class="p-name entry-title"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1>
<div class="metadata">
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/base/templates/index.tmpl
Expand Up @@ -26,7 +26,7 @@
% endif
<div class="postindex">
% for post in posts:
<article class="h-entry post-${post.meta('type')}">
<article class="h-entry post-${post.meta('type')}" itemscope="itemscope" itemtype="http://schema.org/Article">
<header>
<h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
<div class="metadata">
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/bootblog4-jinja/templates/index.tmpl
Expand Up @@ -26,7 +26,7 @@
{% endif %}
<div class="postindex">
{% for post in posts %}
<article class="h-entry post-{{ post.meta('type') }}">
<article class="h-entry post-{{ post.meta('type') }}" itemscope="itemscope" itemtype="http://schema.org/Article">
<header>
<h1 class="p-name entry-title"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1>
<div class="metadata">
Expand Down
2 changes: 1 addition & 1 deletion nikola/data/themes/bootblog4/templates/index.tmpl
Expand Up @@ -26,7 +26,7 @@
% endif
<div class="postindex">
% for post in posts:
<article class="h-entry post-${post.meta('type')}">
<article class="h-entry post-${post.meta('type')}" itemscope="itemscope" itemtype="http://schema.org/Article">
<header>
<h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
<div class="metadata">
Expand Down

0 comments on commit 3fe69a4

Please sign in to comment.