Skip to content

truncatewords is unsafe #117

Closed
Closed
@annam002

Description

Hi,
thanks for this easy starting point with jekyll!

I just want to make you aware that this line in index.html is unsafe:
{{ post.content | truncatewords:40}}
Depending of what you have in your post, you might be in the middle of markup. I am not entirely sure why, but in our page it resulted in strange <em> tags appearing. I switched it now to use the
{{ post.excerpt }}
tag with a custom excerpt separator and that works better.

Best,
Anna

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions