mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
theme: Display short command on commands list
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
7f81dd9972
commit
9630c38cb8
@@ -49,7 +49,12 @@
|
||||
{{ end }}
|
||||
<p
|
||||
class="text-black dark:text-gray-100 leading-6 text-sm md:text-base three-lines-ellipsis">
|
||||
{{ (or .Params.description .Summary) | plainify | safeHTML }}
|
||||
{{ if and (eq .Section "commands") .IsPage }}
|
||||
{{ $simpleCobraCommandShort := .RawContent | strings.ReplaceRE `(?s)^##\s.+?\n\n(.+?)\n\n.*` "$1" }}
|
||||
{{ printf "%s." $simpleCobraCommandShort }}
|
||||
{{ else }}
|
||||
{{ (or .Params.description .Summary) | plainify | safeHTML }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user