|
1 | | -<article class="post"> |
2 | | - <section> |
3 | | - <div class="post__content copy"> |
4 | | - <h1> |
5 | | - <%= link(@post.title, to: Routes.post_path(@conn, :show, @post)) %> |
6 | | - </h1> |
7 | | - <%= raw Tilex.Markdown.to_html(@post.body) %> |
| 1 | +<article class="post post__content" itemscope itemtype="https://schema.org/BlogPosting"> |
| 2 | + <header itemprop="headline"> |
| 3 | + <h3><%= link(@post.title, to: Routes.post_path(@conn, :show, @post)) %></h3> |
| 4 | + </header> |
8 | 5 |
|
9 | | - <%= if assigns[:twitter_shareable] && Mix.env != :test do %> |
10 | | - <a href='http://twitter.com/share' |
11 | | - class='twitter-share-button' |
12 | | - data-text= "Today I learned: <%= @post.title %>" |
13 | | - data-via= "<%= Tilex.Blog.Developer.twitter_handle(@post.developer) %>" |
14 | | - data-hashtags= "<%= @post.channel.twitter_hashtag %>" |
15 | | - data-url= "<%= Routes.post_url(@conn, :show, @post) %>"> |
16 | | - Tweet |
17 | | - </a> |
18 | | - <% end %> |
| 6 | + <div class="copy" itemprop="blogPost"> |
| 7 | + <%= raw Tilex.Markdown.to_html(@post.body) %> |
| 8 | + </div> |
| 9 | + |
| 10 | + <%= if assigns[:twitter_shareable] && Mix.env != :test do %> |
| 11 | + <a href='http://twitter.com/share' |
| 12 | + class='twitter-share-button' |
| 13 | + data-text= "Today I learned: <%= @post.title %>" |
| 14 | + data-via= "<%= Tilex.Blog.Developer.twitter_handle(@post.developer) %>" |
| 15 | + data-hashtags= "<%= @post.channel.twitter_hashtag %>" |
| 16 | + data-url= "<%= Routes.post_url(@conn, :show, @post) %>"> |
| 17 | + Tweet |
| 18 | + </a> |
| 19 | + <% end %> |
19 | 20 |
|
20 | | - <footer> |
21 | | - <p class="byline"> |
22 | | - <%= link(@post.developer.username, to: Routes.developer_path(@conn, :show, @post.developer)) %> |
23 | | - <br/> |
24 | | - <time datetime="<%= @post.inserted_at %>"> |
25 | | - <%= link(display_date(@post), to: Routes.post_path(@conn, :show, @post), class: "post__permalink") %> |
26 | | - </time> |
27 | | - </p> |
28 | | - </footer> |
| 21 | + <footer class="byline"> |
| 22 | + <%= link(@post.developer.username, to: Routes.developer_path(@conn, :show, @post.developer), itemprop: "author") %> |
| 23 | + <div itemprop="datePublished"> |
| 24 | + <%= link(display_date(@post), to: Routes.post_path(@conn, :show, @post), class: "post__permalink") %> |
29 | 25 | </div> |
30 | | - <aside> |
31 | | - <ul> |
| 26 | + </footer> |
| 27 | + <aside> |
| 28 | + <ul> |
| 29 | + <li> |
| 30 | + <%= link("##{@post.channel.name}", to: Routes.channel_path(@conn, :show, @post.channel.name), class: "post__tag-link", itemprop: "keywords") %> |
| 31 | + </li> |
| 32 | + <li> |
| 33 | + <%= link("permalink", to: Routes.post_path(@conn, :show, @post), class: "post__permalink") %> |
| 34 | + </li> |
| 35 | + <li> |
| 36 | + <%= link("raw", to: "#{Routes.post_path(@conn, :show, @post)}.md", class: "post__raw-link") %> |
| 37 | + </li> |
| 38 | + <%= if TilexWeb.SharedView.post_creator_or_admin?(@conn, @post) do %> |
32 | 39 | <li> |
33 | | - <%= link("##{@post.channel.name}", to: Routes.channel_path(@conn, :show, @post.channel.name), class: "post__tag-link") %> |
| 40 | + <%= link("edit", to: Routes.post_path(@conn, :edit, @post), class: "post__permalink") %> |
34 | 41 | </li> |
35 | | - <li> |
36 | | - <%= link("permalink", to: Routes.post_path(@conn, :show, @post), class: "post__permalink") %> |
37 | | - </li> |
38 | | - <li> |
39 | | - <%= link("raw", to: "#{Routes.post_path(@conn, :show, @post)}.md", class: "post__raw-link") %> |
40 | | - </li> |
41 | | - <%= if TilexWeb.SharedView.post_creator_or_admin?(@conn, @post) do %> |
42 | | - <li> |
43 | | - <%= link("edit", to: Routes.post_path(@conn, :edit, @post), class: "post__permalink") %> |
44 | | - </li> |
| 42 | + <% end %> |
| 43 | + <li> |
| 44 | + <%= link to: "#", class: "js-like-action post__like-link", id: @post.slug do %> |
| 45 | + <span class="post__like-heart"><%= icon("heart", :small, "likes") %></span> |
| 46 | + <span class="post__like-count"><%= @post.likes %></span> |
45 | 47 | <% end %> |
46 | | - <li> |
47 | | - <%= link to: "#", class: "js-like-action post__like-link", id: @post.slug do %> |
48 | | - <span class="post__like-heart"><%= icon("heart", :small, "likes") %></span> |
49 | | - <span class="post__like-count"><%= @post.likes %></span> |
50 | | - <% end %> |
51 | | - </li> |
52 | | - </ul> |
53 | | - </aside> |
54 | | - </section> |
| 48 | + </li> |
| 49 | + </ul> |
| 50 | + </aside> |
55 | 51 | </article> |
0 commit comments