def truncate_words(content, length=10, suffix='...'):
    """
    Truncates a string after a certain number of words.
    :rtype str
    """
    split = content.split()
    if len(split) <= length:
        return ' '.join(split[:length])
    else:
        return ' '.join(split[:length]) + suffix
