Skip to content

Instantly share code, notes, and snippets.

@7studio
Last active August 29, 2015 13:56
Show Gist options
  • Save 7studio/9050764 to your computer and use it in GitHub Desktop.
Save 7studio/9050764 to your computer and use it in GitHub Desktop.
schemas
<!--
# Article
* http://schema.org/Article
* https://developers.google.com/structured-data/rich-snippets/articles
* http://coding.smashingmagazine.com/2012/10/23/road-reusable-html-components/
-->
<div class="Article" itemscope itemtype="http://schema.org/Article">
<h? class="Article-headline" itemprop="headline">{{title}}</h?>
<dl class="Article-meta">
<dt>Auteur&nbsp;: </dt>
<dd itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{name}}</span>
</dd>
<dt>Date de publication&nbsp;: </dt>
<dd>
<meta itemprop="datePublished" datetime="{{date.ISO8601}}">
{{date.human}}
</dd>
<dt>Catégorie(s)&nbsp;: </dt>
<dd itemprop="articleSection">{{section}}</dd>
</dl>
<meta itemprop="image" content="{{image}}"><!-- Google expects `image` property instead of `associatedMedia`. No comment… -->
<div class="Media Article-media" itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="representativeOfPage" content="1">
<div class="Media-object"><img src="{{image}}" alt="" itemprop="contentURL"></div>
<!--<div class="Media-caption" itemprop="caption">{{caption}}</div>-->
</div>
<!--<div class="Article-description" itemprop="description">{{excerpt}}</div>-->
<div class="Article-body" itemprop="articleBody">{{content}}</div>
</div>
<!--
# Event
* http://schema.org/Event
* https://developers.google.com/structured-data/rich-snippets/events
-->
<div class="Event" itemscope itemtype="http://schema.org/Event">
<h? class="Event-name" itemprop="name">{{title}}</h?>
<dl class="Event-meta">
<!--
<dt>Date de début&nbsp;: </dt>
<dd>
<meta itemprop="startDate" content="{{startDate.ISO8601}}">
{{startDate.human}}
</dd>
<dt>Date de fin&nbsp;: </dt>
<dd>
<meta itemprop="endDate" content="{{endDate.ISO8601}}">
{{endDate.human}}
</dd>
-->
<dt>Date&nbsp;: </dt>
<dd>
<meta itemprop="startDate" datetime="{{startDate.ISO8601}}">
<meta itemprop="endDate" datetime="{{endDate.ISO8601}}">
{{date}}
</dd>
<dt>Lieu&nbsp;: </dt>
<dd itemprop="location" itemscope itemtype="http://schema.org/Place">
<span itemprop="name">{{place}}</span>
<span itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress"><!-- Google expects a valid postal address not just a all-purpose name (http://schema.org/PostalAddress) --></span>
</dd>
</dl>
<div class="Media Event-media" itemscope itemtype="http://schema.org/ImageObject">
<meta itemprop="representativeOfPage" content="1">
<div class="Media-object"><img src="{{image}}" alt="" itemprop="contentURL"></div>
<!--<div class="Media-caption" itemprop="caption">{{caption}}</div>-->
</div>
<!--<div class="Event-description">{{excerpt}}</div>-->
<div class="Event-body">{{content}}</div>
</div>
@7studio
Copy link
Author

7studio commented Sep 18, 2014

@7studio
Copy link
Author

7studio commented Sep 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment