{{- /* A thought is the first H1 in the page body. The front matter title is only a formality. */ -}} {{- $matches := findRE `]*>[\s\S]*?` .Content 1 -}} {{- $text := "" -}} {{- with $matches -}} {{- $text = index . 0 | plainify | htmlUnescape | strings.TrimSpace -}} {{- end -}} {{- if not $text -}} {{- $text = .Plain | strings.TrimSpace -}} {{- end -}} {{- return $text -}}