diff options
author | Valentin Popov <info@valentineus.link> | 2018-09-18 23:54:27 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-09-19 01:38:20 +0300 |
commit | 08d3c86e94142c4efe6e6f089bf652c6a223107a (patch) | |
tree | 1604807951e0f7619a9332bfb120b7ea710f0224 | |
parent | e2d720bead55e69588f188463361909754f74346 (diff) | |
download | popov.link-08d3c86e94142c4efe6e6f089bf652c6a223107a.tar.xz popov.link-08d3c86e94142c4efe6e6f089bf652c6a223107a.zip |
Added micro-markup 'Schema.org' for posts
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | _layouts/post.html | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/_layouts/post.html b/_layouts/post.html index 952b9f6..ece8fe4 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,15 +2,32 @@ layout: default --- -<article> +<article itemtype="http://schema.org/Article" itemscope> + <link itemprop="mainEntityOfPage" itemscope href="{{ page.url | absolute_url | uri_escape }}" /> + <link itemprop="image" itemscope href="{{ page.image | default: site.image | absolute_url | uri_escape }}" /> + + <!-- Header --> <header class="page-header"> <h1 class="text-muted"> - {{ page.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }} - <p><small><time datetime="{{ page.date | date_to_xmlschema}}">{{ page.date | date_to_long_string }}</time></small></p> + <span itemprop="headline">{{ page.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span> + <p><small><time itemprop="datePublished" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date_to_long_string }}</time></small></p> </h1> </header> - {{ content }} + <!-- Description --> + <meta itemprop="description" content="{{ page.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" /> + + <!-- Author --> + <section itemprop="author" itemscope itemtype="http://schema.org/Person"> + <meta itemprop="email" content="{{ site.author.email | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" /> + <meta itemprop="name" content="{{ site.author.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" /> + </section> + + <!-- Content --> + <section itemprop="articleBody"> + {{ content }} + </section> + <!-- Comments --> {% include disqus.html %} -</article> +</article>
\ No newline at end of file |