hacks-guide-minimal-mistake.../_layouts/single.html

51 lines
2.2 KiB
HTML

---
layout: default
---
{% include base_path %}
<article class="post" itemscope itemtype="http://schema.org/CreativeWork">
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: "%B %d, %Y" }}">{% endif %}
{% if page.modified %}<meta itemprop="dateModified" content="{{ page.modified | date: "%B %d, %Y" }}">{% endif %}
<div class="article-wrap">
<header>
{% if page.link %}
<h1 itemprop="headline"><a href="{{ page.link }}">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</a></h1>
{% else %}
<h1 itemprop="headline"><a href="{{ base_path }}{{ page.url }}" rel="bookmark">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</a></h1>
{% endif %}
</header>
<section itemprop="text">
{{ content }}
</section>
<hr />
<footer role="contentinfo">
{% if page.share %}{% include social-share %}{% endif %}
{% if page.date %}
<p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %}.</p>
{% endif %}
</footer>
</div><!-- /.article-wrap -->
{% if site.disqus_shortname and page.comments %}
<section id="disqus_thread"></section><!-- /#disqus_thread -->
{% endif %}
</article>
{% comment %}<!-- only show related on a post page when not disabled -->{% endcomment %}
{% if page.id and page.related and site.related_posts.size > 0 %}
<div class="related-articles">
<h4>You might also enjoy <small class="pull-right">(<a href="{{ base_path }}/posts/">View all posts</a>)</small></h4>
<ul>
{% for post in site.related_posts limit:3 %}
<li><a href="{{ base_path }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
<hr />
</div><!-- /.related-articles -->
{% endif %}