code: func (c *ContentSpec) TruncateWordsByRune(in []string) (string, bool) {
  	words := make([]string, len(in))
  	copy(words, in)
  
  	count := 0
  	for index, word := range words {
  		if count >= c.summaryLength {
  			return strings.Join(words[:index], " "), true
  		}
  		runeCount := utf8.RuneCountInString(word)
  		if len(word) == runeCount {
  			count++
  		} else if count+runeCount < c.summaryLength {
  			count += runeCount
  		} else {
  			for ri := range word {
  				if count >= c.summaryLength {
  					truncatedWords := append(words[:index], word[:ri])
  					return strings.Join(truncatedWords, " "), true
  				}
  				count++
  			}
  		}
  	}
  
  	return strings.Join(words, " "), false
  }
docs: // TruncateWordsByRune truncates words by runes.