/
single.html
99 lines (90 loc) · 2.96 KB
/
single.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{{ define "head" }}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
displayAlign: "center",
displayIndent: "0em",
"HTML-CSS": { scale: 100,
linebreaks: { automatic: "false" },
webFont: "TeX"
},
SVG: {scale: 100,
linebreaks: { automatic: "false" },
font: "TeX"},
NativeMML: {scale: 100},
TeX: { equationNumbers: {autoNumber: "AMS"},
MultLineWidth: "85%",
TagSide: "right",
TagIndent: ".8em"
}
});
</script>
<!-- https://gohugo.io/content-management/formats/#mathjax-with-hugo -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script> -->
<!-- Chroma Github theme CSS -->
<link rel="stylesheet" href="{{ "css/github_chroma.css" | relURL }}" type="text/css" />
{{ end }}
{{ define "main" }}
<div class="post">
<h1 class="post-title">{{ .Title }}</h1>
{{ with .GitInfo }} <!-- To enable this, put "enableGitInfo = true" in your site config.toml -->
This test was created/modified in commit <a href="https://github.com/kaushalmodi/ox-hugo/commit/{{- .Hash -}}">
{{- .AbbreviatedHash -}}</a> "{{ .Subject }}" on <b>{{ dateFormat "2006-01-02" .AuthorDate }}</b>.
{{ end }}
<p>
{{ if .Params.categories }}
Categories:
{{ range .Params.categories }}
<a href="/categories/{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
</p>
<p>
{{ if .Params.tags }}
Tags:
{{ range .Params.tags }}
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
</p>
<p>
{{ if .Params.draft }}
<hr>
<center><h2>This is a Draft</h2></center>
<hr>
{{ end }}
</p>
{{ .Content }}
{{ with .Resources }}
<hr>
<h3>Resources</h3>
<ul>
{{ range . }}
{{ if .RelPermalink }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ else }}
<li>{{ .ResourceType | title }} (no link, only embedded in page)</li>
{{ end }}
{{ end }}
</ul>
{{ end }}
{{ with .Resources.ByType "page" }}
<hr>
<h3 id="sub-pages">Bundled Sub-pages</h3>
{{ range . }}
<h4>{{ .Title }}</h4>
{{ .Content }}
{{ end }}
{{ end }}
<hr>
<a id="debug"></a>
<h3 id="page-debug">Page Params (Debug)</h3>
{{ partial "debugprint.html" .Params }}
{{ with .Resources }}
<h3 id="resources-debug">Resources (Debug)</h3>
{{ partial "debugprint.html" . }}
{{ end }}
<h3 id="file-debug">File Object (Debug)</h3>
{{ partial "debugprint.html" (slice "File" .) }}
</div>
{{ end }}