Use custom URL if author starts with https://
#125
|
@ -15,13 +15,13 @@
|
|||
{{ $s.Set "len" (len .Params.authors) }}
|
||||
{{ $s.Add "len" -1 }}
|
||||
{{ range $idx, $author := .Params.authors -}}
|
||||
<a class="author" href="https://gitea.com/{{ $author | default $.Site.Params.author }}">
|
||||
{{ $author | default $.Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix $author "https://" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
||||
{{ path.BaseName $author }}
|
||||
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
<a class="author" href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
||||
{{ .Params.author | default .Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix .Params.author "https://" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
||||
jolheiser marked this conversation as resolved
Outdated
|
||||
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
{{ $s.Set "len" (len .Params.authors) }}
|
||||
{{ $s.Add "len" -1 }}
|
||||
{{ range $idx, $author := .Params.authors -}}
|
||||
<a class="author" href="https://gitea.com/{{ $author | default $.Site.Params.author }}">
|
||||
{{ $author | default $.Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix $author "https://" }}{{ $author }}{{ else }}https://gitea.com/{{ $author }}{{ end }}">
|
||||
{{ path.BaseName $author }}
|
||||
</a>{{ if ne $idx ($s.Get "len") }}, {{end}}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
<a class="author" href="https://gitea.com/{{ .Params.author | default .Site.Params.author }}">
|
||||
{{ .Params.author | default .Site.Params.author }}
|
||||
<a class="author" href="{{ if hasPrefix .Params.author "https://" }}{{ .Params.author }}{{ else }}https://gitea.com/{{ .Params.author }}{{ end }}">
|
||||
jolheiser marked this conversation as resolved
Outdated
delvh
commented
Please adapt it in Please adapt it in `#21` as well.
|
||||
{{ path.BaseName (.Params.author | default .Site.Params.author) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</b>
|
||||
|
|
Reference in New Issue
Block a user
Please also adapt it in
#18
.