Limit the {{ .Summary }}

Perhaps the .Summary of one of the posts was not 200 characters (an empty post), and with slicestr you tried to get the first 200 characters (which weren’t there).

If you check whether a post has a .Summary of at least 200 characters, does the error then go away?

For example (untested):

{{ if gt (len .Summary) 200 }}

  <h6><a href="{{ .Permalink }}">{{ .Title }}</a></h6>
  
  <p>{{slicestr .Summary 3 200}}</p>
  
  <a href="{{ .Permalink }}">Read More</a>

{{ end }}
2 Likes