Przeglądaj źródła

fix: space after author name when using `link_authors`

Fix dc0407a0e2fad29e624479bd17f7c89a4aa28582
Fix #1356
George Cushen 5 lat temu
rodzic
commit
01189e8056
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      layouts/partials/page_metadata_authors.html

+ 2 - 2
layouts/partials/page_metadata_authors.html

@@ -8,8 +8,8 @@
     {{- $name := $profile_page.Params.name | default ($value|markdownify) -}}
     {{- if gt $index 0 }}, {{ end -}}
     <span>
-      {{- with $profile_page -}}
-        {{ if $link_authors }}<a href="{{.RelPermalink}}">{{$name}}</a>{{else}}{{$name}}{{end}}
+      {{- if and $profile_page $link_authors -}}
+        <a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
       {{- else -}}
         {{$name}}
       {{- end -}}