Add IndieWeb Identity partial to <head>

master
Kevin C. Coram 2019-12-02 22:57:55 -05:00
parent 53396b9f16
commit fc7dddfae6
Signed by: kevin
GPG Key ID: 0342351B3D61AD35
2 changed files with 17 additions and 0 deletions

View File

@ -4,6 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{- partial "identity.html" . }}
<title>{{- block "title" . -}}
{{ .Site.Title }}
{{- end -}}</title>

View File

@ -0,0 +1,16 @@
{{- range .Site.Params.Identity -}}
{{- $relMe := cond .authn "me authn" "me" -}}
{{- if (eq .type "Email") }}
<link rel="{{ $relMe }}" href="mailto:{{ .value }}">
{{- else if (eq .type "GitHub") }}
<link rel="{{ $relMe }}" href="https://github.com/{{ .value }}">
{{- else if (eq .type "GitLab") }}
<link rel="{{ $relMe }}" href="https://gitlab.com/{{ .value }}">
{{- else if (eq .type "Twitter") }}
<link rel="{{ $relMe }}" href="https://twitter.com/{{ .value }}">
{{- else if (eq .type "MicroBlog") }}
<link rel="{{ $relMe }}" href="https://micro.blog/{{ .value }}">
{{- else if (eq .type "PGP") }}
<link rel="pgpkey authn" href="{{ .value }}">
{{- end -}}
{{- end -}}