mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
include: don't generate additional HTML if file should be displayed without parameter #110
This commit is contained in:
parent
82a3ee5a90
commit
0058c51b32
1 changed files with 3 additions and 4 deletions
|
@ -1,6 +1,5 @@
|
|||
{{- $file := .Get 0 }}
|
||||
{{- $showFirstHeading := .Get 1 | default true }}
|
||||
<div class="include{{ if not $showFirstHeading }} hide-first-heading{{ end }}">
|
||||
|
||||
{{ $file | readFile | safeHTML }}
|
||||
</div>
|
||||
{{- if not $showFirstHeading }}<div class="include hide-first-heading">{{ end }}
|
||||
{{ $file | readFile | safeHTML -}}
|
||||
{{- if not $showFirstHeading }}</div>{{ end }}
|
Loading…
Reference in a new issue