mirror of https://github.com/luizdepra/hugo-coder.git

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