{{ .Title }} {{- partial "post/toc.html" . -}} {{ .Content }} {{- $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 }} References {{- range sort . "Title" }}{{ .Title }}{{ end }} {{- end }} {{ partial "backlinks" . }}