2021-08-25 09:53:41 +00:00
|
|
|
<h1 class="display-4">{{ .Title }}</h1>
|
|
|
|
{{ if .Params.subtitle }}
|
2022-05-11 12:10:49 +00:00
|
|
|
<h5 class="my-3">{{ markdownify .Params.subtitle | emojify }}</h5>
|
2021-08-25 09:53:41 +00:00
|
|
|
{{ end }}
|
|
|
|
|
2021-08-24 17:49:26 +00:00
|
|
|
{{ if .IsPage }}
|
2022-05-11 12:10:49 +00:00
|
|
|
<p>{{ partial "content-details.html" . }}</p>
|
2022-04-12 10:35:34 +00:00
|
|
|
|
2022-05-11 12:10:49 +00:00
|
|
|
<!-- When directly viewing the article, if available, we also include revision date-->
|
|
|
|
{{ if and (not .Lastmod.IsZero) (not (.Lastmod.Equal .Date)) }}
|
|
|
|
<span class="pr-2" title='{{ .Lastmod.Format "January 2 2006" }}'>
|
|
|
|
<i class="pr-1 content-detail">Article revised in: {{ .Lastmod.Format "January 2 2006" }}</i>
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
2021-08-24 17:49:26 +00:00
|
|
|
{{ end }}
|
|
|
|
|
2021-08-25 09:53:41 +00:00
|
|
|
{{ if .Content }}
|
2022-05-11 12:10:49 +00:00
|
|
|
<hr>
|
2021-08-25 09:53:41 +00:00
|
|
|
|
2022-05-11 12:10:49 +00:00
|
|
|
<div class="content mt-3">
|
2021-08-26 00:06:40 +00:00
|
|
|
{{ if .TableOfContents }}
|
2022-05-11 12:10:49 +00:00
|
|
|
<!-- Get the amount of headers using regex -->
|
2022-05-14 21:11:39 +00:00
|
|
|
{{ $headers := findRE "<h[1-6] ?.*?>(.|\n)*?</h[1-6]>" .Content }}
|
|
|
|
<!-- We only need to show a table of contents if we have over 4 headers -->
|
|
|
|
{{ if ge (len $headers) 4 }}
|
|
|
|
<div class="float-lg-end ml-lg-3 mb-3 p-3">
|
|
|
|
{{ .TableOfContents }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-04-12 09:25:06 +00:00
|
|
|
|
2022-05-14 21:11:39 +00:00
|
|
|
{{ .Content }}
|
2022-04-12 09:25:06 +00:00
|
|
|
|
2022-05-14 21:11:39 +00:00
|
|
|
|
|
|
|
<div id="sources">
|
|
|
|
{{ if .Params.Sources }}
|
|
|
|
<h2>Sources</h2>
|
|
|
|
<ul>
|
|
|
|
{{ range $i, $e := .Params.Sources }}
|
|
|
|
<li>{{ markdownify $e }}</li>
|
2022-05-11 12:10:49 +00:00
|
|
|
{{ end }}
|
2022-05-14 21:11:39 +00:00
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-05-23 16:12:15 +00:00
|
|
|
<div id="changelog">
|
|
|
|
{{ if .Params.Changelog }}
|
|
|
|
<h2> Changelog</h2>
|
|
|
|
<ul class="changelog-time">
|
|
|
|
{{ range $i, $e := .Params.Changelog }}
|
|
|
|
<li>
|
|
|
|
{{ time $i | time.Format "2006-01-02" }}:
|
|
|
|
<ul>
|
|
|
|
{{ range $c := $e }}
|
|
|
|
<li>{{ markdownify $c }}</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-05-11 12:10:49 +00:00
|
|
|
</div>
|
2021-08-25 09:53:41 +00:00
|
|
|
{{ end }}
|