forked from scientific-python/scientific-python-hugo-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.html
More file actions
31 lines (31 loc) · 1 KB
/
meta.html
File metadata and controls
31 lines (31 loc) · 1 KB
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
{{- if .Params.Author -}}
{{- errorf "Page %q uses deprecated 'author' field. Please use 'authors' instead." .File.Path -}}
{{- end -}}
<div class="post-meta">
<span class="post-authors">
{{- range .Params.Authors -}}
{{ $author := trim (index (findRE `[^<]*` . 1) 0) "\n\r " }}
{{ $handle := index (index (findRESubmatch `<(.*?)>` . 1) 0) 1 }}
<div class="post-author">
<i class="fa-solid fa-user"></i>
{{ if $handle }}
<a href="/authors/{{ $handle }}">{{ $author }}</a>
{{- else }}
{{- $author }}
{{- end }}
</div>
{{- end -}}
</span>
{{ if .Date }}
<span class="post-date"><i class="fa-regular fa-calendar"></i> {{.Date.Format "January 2, 2006"}}</span>
{{ end }}
{{- if .Params.tags -}}
<div class="post-tags">
<i class="fa-solid fa-tag"></i>
{{- range .Params.tags -}}
{{- $tag := urlize . }}
<span class="post-tag"><a href="{{ path.Join "/tags/" $tag | relURL }}">#{{ $tag }}</a></span>
{{- end -}}
</div>
{{- end -}}
</div>