diff options
Diffstat (limited to 'themes/default/layouts/partials/meta-handle.html')
-rw-r--r-- | themes/default/layouts/partials/meta-handle.html | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/themes/default/layouts/partials/meta-handle.html b/themes/default/layouts/partials/meta-handle.html index ee7f975..ee0cc50 100644 --- a/themes/default/layouts/partials/meta-handle.html +++ b/themes/default/layouts/partials/meta-handle.html @@ -1,13 +1,25 @@ -{{- with .Params.feed.domain -}} -<a - title="{{ . }}" - href="http://{{ . }}"> - @{{ . -}} -</a> -{{- 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> +{{- $author := .Section -}} + +{{- $host := or (urls.Parse ("" | absURL)).Host "localhost" -}} +{{- $href := print ("" | absURL) "/" $author "/" -}} + +{{- $title := print $author "@" $host -}} + +{{- with .Params.feed -}} + {{- $host = $.Params.feed.domain -}} + {{- $href = or $.Params.feed.home (print "http://" $.Params.feed.domain) -}} + {{- $title = $.Params.feed.domain -}} {{- end -}} + +<meta-handle> +{{- /* This comment removes trailing newlines and white spaces. */ -}} + <a + title="{{ $title }}" + href="{{ $href }}"> + {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/at-sign.svg")) -}} + <span>{{- $host -}}</span> +{{- /* This comment removes trailing newlines and white spaces. */ -}} + </a> +{{- /* This comment removes trailing newlines and white spaces. */ -}} +</meta-handle> +{{- /* This comment removes trailing newlines and white spaces. */ -}} |