mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
2989c38245
This commit adds a truncate template function for safely truncating text without breaking words. The truncate function is HTML aware, so if the input text is a template.HTML it will be truncated without leaving broken or unclosed HTML tags. {{ "this is a very long text" | truncate 10 " ..." }} {{ "With [Markdown](/markdown) inside." | markdownify | truncate 10 }} |
||
---|---|---|
.. | ||
404.md | ||
ace.md | ||
amber.md | ||
blocks.md | ||
content.md | ||
debugging.md | ||
functions.md | ||
go-templates.md | ||
homepage.md | ||
list.md | ||
overview.md | ||
partials.md | ||
rss.md | ||
sitemap.md | ||
terms.md | ||
variables.md | ||
views.md |