Skip to content

Commit a10ab4b

Browse files
committed
fix summary comp
1 parent da13c79 commit a10ab4b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.vscode/docker.code-snippets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
"Insert a Summary Bar": {
5858
"prefix": ["summary-bar"],
5959
"body": [
60-
"{{< summary-bar feature_name=\"$1\" >}}",
60+
"{{< summary-bar feature_name=\"$1\" ${2| ,text=\"some text\"|} >}}",
6161
"",
62-
"$2",
62+
"$3",
6363
],
6464
"description": "Insert a Hugo summary bar with a feature name and content. Define your summary key in data/summary.yaml.",
6565
},

layouts/shortcodes/summary-bar.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@
5454
{{ end }}
5555
{{ end }}
5656
<span class="font-bold">Availability:</span>
57-
<span>
58-
{{ $availabilityText }}
59-
</span>
57+
<span>{{ $availabilityText }}{{- if $text -}}.{{- end -}}</span>
6058
<div>
6159
<span>
62-
{{- if $text -}}
63-
. {{ $text | markdownify }}
60+
{{- if $text -}}{{ $text | markdownify }}
6461
{{- end -}}
6562
</span>
6663
</div>

0 commit comments

Comments
 (0)