post.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ---
  2. layout: default
  3. ---
  4. {% assign minutes = content | strip_html | number_of_words | divided_by: 180 %}
  5. {% if minutes == 0 %}
  6. {% assign minutes = 1 %}
  7. {% endif %}
  8. <div class="post-header mb2">
  9. <h1>{{ page.title }}</h1>
  10. <span class="post-meta">{{ page.date | date: site.date_format }}</span><br>
  11. {% if page.update_date %}
  12. <span class="post-meta">{{ site.text.post.updated }}: {{ page.update_date | date: site.date_format }}</span><br>
  13. {% endif %}
  14. <span class="post-meta small">
  15. {% if page.minutes %}
  16. {{ page.minutes }} {{ site.text.post.minute_read }}
  17. {% else %}
  18. {{ minutes }} {{ site.text.post.minute_read }}
  19. {% endif %}
  20. </span>
  21. </div>
  22. <article class="post-content">
  23. {{ content }}
  24. </article>
  25. {% if site.show_sharing_icons %}
  26. {% include share_buttons.html %}
  27. {% endif %}
  28. {% if site.show_post_footers %}
  29. {% include post_footer.html %}
  30. {% endif %}
  31. {% if txtpen.txtpen_sitename %}
  32. <script src="https://txtpen.com/embed.js?site={{txtpen.txtpen_sitename}}" />
  33. {% endif %}
  34. {% if site.disqus_shortname %}
  35. <div id="disqus_thread"></div>
  36. <script type="text/javascript">
  37. var disqus_shortname = '{{ site.disqus_shortname }}';
  38. var disqus_identifier = '{{ page.id }}';
  39. var disqus_title = {{ page.title | jsonify }};
  40. (function() {
  41. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  42. dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
  43. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  44. })();
  45. </script>
  46. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  47. {% endif %}
  48. {% if site.facebook_comments %}
  49. <div class="fb-comments" data-href="{{ site.url }}{{ page.url }}" data-width="100%" data-numposts="{{ site.facebook_comments_number }}"></div>
  50. {% endif %}
  51. {% if site.show_related_posts %}
  52. <h3 class="related-post-title">{{ site.text.post.related_posts }}</h3>
  53. {% for post in site.related_posts %}
  54. <div class="post ml2">
  55. <a href="{{ post.url | prepend: site.baseurl }}" class="post-link">
  56. <h4 class="post-title">{{ post.title }}</h4>
  57. <p class="post-summary">{{ post.summary }}</p>
  58. </a>
  59. </div>
  60. {% endfor %}
  61. {% endif %}