single.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {{ partial "header.html" . }}
  2. <article class="post-single">
  3. <header class="post-header">
  4. <h1 class="post-title">{{ .Title }}</h1>
  5. <div class="post-meta">
  6. {{- if or .Params.author .Site.Params.author -}}
  7. {{ .Params.author | default .Site.Params.author }} · {{ end }}
  8. {{- .Date.Format "January 2, 2006" -}}
  9. </div>
  10. </header>
  11. <div class="post-content">{{ .Content }}</div>
  12. {{ if .Params.tags }}
  13. <footer class="post-footer">
  14. <ul class="post-tags">
  15. {{ range .Params.tags }}
  16. {{ $href := print (absURL "tags/") (urlize .) }}
  17. <li><a href="{{ $href }}">{{ . }}</a></li>
  18. {{ end }}
  19. </ul>
  20. </footer>
  21. {{ end }}
  22. <!-- Comments area start -->
  23. {{ if not (eq .Params.comments false) }}
  24. {{ if .Site.DisqusShortname }}
  25. <div id="disqus_thread"></div>
  26. <script>
  27. var disqus_shortname = '{{ .Site.DisqusShortname }}';
  28. (function() {
  29. var d = document, s = d.createElement('script');
  30. s.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
  31. s.setAttribute('data-timestamp', +new Date());
  32. (d.head || d.body).appendChild(s);
  33. })();
  34. </script>
  35. <noscript>
  36. Please enable JavaScript to view the
  37. <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
  38. </noscript>
  39. <!-- Comments area end -->
  40. {{ end }}
  41. {{ end }}
  42. </article>
  43. {{ partial "footer.html" . }}