article.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends "base.html" %}
  2. {% block title %}{{ article.title }} - {{ SITENAME }}{% endblock %}
  3. {% block extra_meta %}
  4. <meta name="description" content="{{ article.summary|striptags }}">
  5. {% if PELICAN_SIMPLEGREY_TWITTER_CARD_ACCOUNT %}
  6. <meta name="twitter:card" content="summary">
  7. <meta name="twitter:creator" content="@{{ PELICAN_SIMPLEGREY_TWITTER_CARD_ACCOUNT }}">
  8. <meta name="twitter:title" content="{{ article.title }}">
  9. <meta name="twitter:description" content="{{ article.summary|striptags }}">
  10. <meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}">
  11. {% endif %}
  12. {% endblock %}
  13. {% block content %}
  14. <article class="full">
  15. <h1>{{ article.title }}</h1>
  16. {% if article.readtime %}
  17. <div>(Read time is about <b>{{article.readtime.minutes}} minutes</b>)</div>
  18. {% endif %}
  19. {% include 'metadata.inc.html' %}
  20. {{ article.content }}
  21. </article>
  22. {% if DISQUS_SITENAME %}
  23. <div class="comments">
  24. <h2>Comments !</h2>
  25. <div id="disqus_thread"></div>
  26. <script type="text/javascript">
  27. var disqus_identifier = "{{ article.url }}";
  28. (function() {
  29. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  30. dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
  31. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  32. })();
  33. </script>
  34. </div>
  35. {% endif %}
  36. {% endblock %}