Przeglądaj źródła

index pages: If available, use abstract as summary

Close #638
George Cushen 7 lat temu
rodzic
commit
74a9bb326e
1 zmienionych plików z 6 dodań i 4 usunięć
  1. 6 4
      layouts/_default/list.html

+ 6 - 4
layouts/_default/list.html

@@ -9,7 +9,7 @@
 
 {{ partial "header_image.html" . }}
 
-<div class="universal-wrapper">
+<div class="article-container">
 
   {{ with .Title }}<h1>{{ . }}</h1>{{ end }}
 
@@ -23,9 +23,11 @@
     <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
     <div class="article-style">
       {{ if .Params.summary }}
-      {{ printf "%s" .Params.summary | markdownify }}
-      {{ else if .Truncated }}
-      {{ printf "%s" .Summary | markdownify }}
+      {{ .Params.summary | plainify | emojify }}
+      {{ else if .Params.abstract }}
+      {{ .Params.abstract | plainify | emojify | truncate 250 }}
+      {{ else if .Summary }}
+      {{ .Summary | plainify | emojify }}
       {{ end }}
     </div>
   </div>