-
Notifications
You must be signed in to change notification settings - Fork 57
/
single.html
93 lines (87 loc) · 3.08 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
{{- define "main" }}
<article class="post-single">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title">
{{ .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft"> [draft]</span></sup>{{- end }}
<!-- my changes here, no idea why, test and figure it out -->
<!-- {{- if .Draft }}<div class="entry-isdraft"><sup> [draft]</sup></div>{{- end }} -->
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
{{- if not (.Param "hideMeta") }}
<div class="post-meta">
{{- partial "post_meta.html" . -}}
{{- partial "translation_list.html" . -}}
{{- partial "edit_post.html" . -}}
{{- partial "post_canonical.html" . -}}
</div>
{{- end }}
</header>
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}}
{{- end }}
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}
{{- if .Content }}
<div class="post-content">
{{ if .Param "series" }}
{{ $currentPage := .Page.Permalink }}
{{ $name := index .Params.series 0 }}
<p><i>This article is a part of the series "<a href='/series/{{$name | urlize }}'>{{$name}}</a>."</i></p>
<p>Other articles in the series:</p>
{{ $name := $name | urlize }}
{{ $series := index .Site.Taxonomies.series $name }}
<ul class="series">
{{ range sort $series.Pages "Date" }}
<li>
{{ if ne $currentPage .Permalink }}
<a href="{{.Permalink}}">{{.LinkTitle}}</a>
{{ else }}<b>{{.LinkTitle}}</b>{{ end }}
</li>
{{end}}
</ul>
{{end}}
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
<!-- Add related content -->
{{- if (.Param "ShowRelatedContent") }}
{{- partial "related.html" . }}
{{- end }}
<!-- Add mermaid min js file -->
{{ if (.Params.mermaid) }}
{{ partial "mermaid.html" }}
{{ end }}
{{ if (.Params.CodapiURL) }}
<codapi-settings url="https://{{ (.Params.CodapiURL) }}"></codapi-settings>
{{ end }}
{{ partial "subscribe.html" . }}
</div>
{{- end }}
<footer class="post-footer">
{{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
<ul class="post-tags">
{{- range ($.GetTerms $tags) }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
{{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
{{- partial "share_icons.html" . -}}
{{- end }}
</footer>
{{- if (.Param "comments") }}
{{- partial "comments.html" . }}
{{- end }}
</article>
{{- end }}{{/* end main */}}