{{- /* Card with a summary of and link to a post. Accepts a dict with the following optional parameters: @context {Page} post: The post to display (default: .). @context {bool} show_category: Whether to display a badge with the name of the category/section the post was published under (default: true). @example: {{ partial "list/post-card.html" (dict "post" . "show_category" true) }} */ -}} {{- $post := .post }} {{- $showCategory := .show_category | default false }}

{{ $post.Title }}

{{- if $showCategory }} {{- $section := $post.Section }} {{ lang.Translate ($section | singularize) | default ($section | singularize | title) }} {{- end }}
{{- with $post.Summary }}
{{ . }}
{{- end }} {{- with $post.Params.tags }} {{- end }}