Change the 70 word limit for summary

I was wondering if it possible to change the 70 word limit of summary in hugo? Is it possible to actually choose what the limit is in certain context or would the change only be global?

I also found this, but is it possible to use this with the if truncate?
{{ if .Truncated }}


You ask several questions.

  • The 70 word is currently hardcoded (I think there is a GitHub issue about it) and this is directly related to .Truncated.
  • The truncate template func is in no way releated to the above (but it is a great function).

thank you for quick reply, anyway to do something if truncated with the truncated function?

You could do something ala:

$myContent := "Hugo is cool"
$truncated := $myContent | truncate

if gt (len $myContent) (len $truncated)

The above is pseudo template code, and you would have to take the ellipse into account etc., but you get the drift.

Thanks! :slight_smile: