1
0

post.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <section class="container post">
  2. <article>
  3. <header>
  4. <h1 class="title">{{ .Title }}</h1>
  5. <h2 class="date">{{ .Date.Format "January 2, 2006" }}</h2>
  6. {{ if eq .Params.math "true" }}
  7. <script type="text/javascript" async
  8. src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
  9. MathJax.Hub.Config({
  10. tex2jax: {
  11. inlineMath: [['$','$']],
  12. displayMath: [['$$','$$']],
  13. processEscapes: true,
  14. processEnvironments: true,
  15. skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
  16. TeX: { extensions: ["AMSmath.js", "AMSsymbols.js"] }
  17. }
  18. });
  19. MathJax.Hub.Queue(function() {
  20. // Fix <code> tags after MathJax finishes running. This is a
  21. // hack to overcome a shortcoming of Markdown. Discussion at
  22. // https://github.com/mojombo/jekyll/issues/199
  23. var all = MathJax.Hub.getAllJax(), i;
  24. for(i = 0; i < all.length; i += 1) {
  25. all[i].SourceElement().parentNode.className += ' has-jax';
  26. }
  27. });
  28. </script>
  29. {{ end }}
  30. </header>
  31. {{ .Content }}
  32. </article>
  33. <br/>
  34. {{ if and (not (eq .Site.DisqusShortname "" )) (eq (.Params.disable_comments | default false) false)}}
  35. {{ template "_internal/disqus.html" . }}
  36. {{ end }}
  37. </section>