From 0058c51b323c062cc8bd99baab71f445b59f5779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 6 Oct 2021 19:51:34 +0200 Subject: [PATCH] include: don't generate additional HTML if file should be displayed without parameter #110 --- layouts/shortcodes/include.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html index 50d06263c3..fe8d506a10 100644 --- a/layouts/shortcodes/include.html +++ b/layouts/shortcodes/include.html @@ -1,6 +1,5 @@ {{- $file := .Get 0 }} {{- $showFirstHeading := .Get 1 | default true }} -
- - {{ $file | readFile | safeHTML }} -
+{{- if not $showFirstHeading }}
{{ end }} +{{ $file | readFile | safeHTML -}} +{{- if not $showFirstHeading }}
{{ end }} \ No newline at end of file