Skip to content

Instantly share code, notes, and snippets.

@dbechrd
Created July 26, 2019 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbechrd/8fda19b671d793a498ff9d5245e5d090 to your computer and use it in GitHub Desktop.
Save dbechrd/8fda19b671d793a498ff9d5245e5d090 to your computer and use it in GitHub Desktop.
<div class="post-summary">
{{ with .Description }}
{{ (markdownify .) }}
{{ else }}
{{ ((delimit (findRE "(<.*?>(.|\n)*?</.*?>\\s*)+" .Content) "") | truncate (default 200 .Site.Params.summary_length) (default "" .Site.Params.text.truncated ) | replaceRE "&amp;" "&" | safeHTML) }}
{{ end }}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment