46 lines
1.3 KiB
HTML
46 lines
1.3 KiB
HTML
{{ define "content" -}}
|
|
<article class="post">
|
|
<header class="post-header">
|
|
<h1 class="post-title">{{ .Title }}</h1>
|
|
</header>
|
|
|
|
{{- partial "post/toc.html" . -}}
|
|
|
|
<div class="post-content">
|
|
{{ .Content }}
|
|
</div>
|
|
|
|
{{- $base := .File.BaseFileName }}
|
|
{{- $needle := printf `/%s.md"` $base }}
|
|
{{- $needle2 := printf `"%s.md"` $base }}
|
|
{{- $refs := slice }}
|
|
{{- range where site.RegularPages "Section" "in" (slice "book" "article" "phdthesis" "inproceedings" "inbook" "techreport") }}
|
|
{{- if or (strings.Contains .RawContent (printf `relref "%s.md"` $base)) (strings.Contains .RawContent (printf `/%s.md"` $base)) }}{{ $refs = $refs | append . }}{{ end }}
|
|
{{- end }}
|
|
{{- with $refs }}
|
|
<section class="note-references">
|
|
<h2>References</h2>
|
|
<ul>
|
|
{{- range sort . "Title" }}<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>{{ end }}
|
|
</ul>
|
|
</section>
|
|
{{- end }}
|
|
|
|
{{ partial "backlinks" . }}
|
|
|
|
<footer class="post-footer">
|
|
{{ with .Params.tags -}}
|
|
<div class="post-tags">
|
|
{{ range . -}}
|
|
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
|
{{ end -}}
|
|
</div>
|
|
{{- end -}}
|
|
|
|
</footer>
|
|
</article>
|
|
<div id="comments">
|
|
{{ partial "comments.html" $ }}
|
|
</div>
|
|
{{- end }}
|