diff options
Diffstat (limited to 'themes/default/layouts/partials/meta-handle.html')
-rw-r--r-- | themes/default/layouts/partials/meta-handle.html | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/themes/default/layouts/partials/meta-handle.html b/themes/default/layouts/partials/meta-handle.html index ee7f975..459877a 100644 --- a/themes/default/layouts/partials/meta-handle.html +++ b/themes/default/layouts/partials/meta-handle.html @@ -1,13 +1,24 @@ -{{- with .Params.feed.domain -}} -<a - title="{{ . }}" - href="http://{{ . }}"> - @{{ . -}} -</a> +{{ $host := (urls.Parse .Site.BaseURL).Host -}} +{{- if (urls.Parse .Site.BaseURL).Host -}} + {{- $host = (urls.Parse .Site.BaseURL).Host -}} {{- else -}} -<a - title="{{ partial "author-user.html" . }}@{{ (urls.Parse .Site.BaseURL).Host }}" - href="{{ .Site.BaseURL }}/{{ partial "author-user.html" . }}/#"> - @{{ (urls.Parse .Site.BaseURL).Host -}} -</a> + {{- $host = "localhost" -}} {{- end -}} + +<micro-metadata-handle> + {{- safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/at-sign.svg")) -}} + {{- with .Params.feed.domain -}} + <a + title="{{ . }}" + href="http://{{ . }}"> + {{ . -}} + </a> + {{- else -}} + <a + title="{{ partial "author-user.html" . }}@{{ $host }}" + href="{{ .Site.BaseURL }}/{{ partial "author-user.html" . }}/#"> + {{- $host -}} + </a> + {{- end -}} +</micro-metadata-handle> +{{- /* This comment removes trailing newlines and white spaces. */ -}} |