aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/author-card.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/author-card.html')
-rw-r--r--themes/default/layouts/partials/author-card.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html
index 97ec9c2..3da9ab2 100644
--- a/themes/default/layouts/partials/author-card.html
+++ b/themes/default/layouts/partials/author-card.html
@@ -1,6 +1,12 @@
{{- $profile := .Data.picture.profile -}}
{{- $file := not (urls.Parse $profile).Host -}}
+{{- $host := (urls.Parse ("" | absURL)).Host -}}
+
+{{- if not $host -}}
+ {{- $host = "localhost" -}}
+{{- end -}}
+
{{- if $file -}}
{{- $profile = print .Data.user "/" $profile -}}
{{- end -}}
@@ -49,8 +55,12 @@
</figure>
</micro-thumbnail>
<micro-header>
- <h2><b>{{ .Data.name }}</b></h2>
- <h3><a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">@{{ .Data.user }}</a></h3>
+ <h2>
+ <b>{{ .Data.name }}</b>
+ </h2>
+ <h3>
+ <a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">{{ .Data.user }}@{{ $host }}</a>
+ </h3>
</micro-header>
<p>{{ .Data.description | markdownify | plainify | htmlUnescape | truncate 60 "..." }}</p>
<a title="Follow with RSS Reader" href="{{ "" | absURL }}/{{ .Data.user }}/rss.xml">