Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Check emptiness before including partials
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng authored and victor-pogor committed Feb 15, 2021
1 parent c832e33 commit 9460662
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions layouts/partials/function/content.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{{- $content := .Content -}}

{{- if .Ruby -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- end -}}
{{- if $content -}}

{{- if .Fraction -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}
{{- if .Ruby -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- end -}}

{{- if .Fontawesome -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- end -}}
{{- if .Fraction -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}

{{- $content = partial "function/checkbox.html" $content -}}
{{- if .Fontawesome -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- end -}}

{{- $content = partial "function/escape.html" $content -}}
{{- $content = partial "function/checkbox.html" $content -}}

{{- $content = partial "function/escape.html" $content -}}

{{- end -}}

{{- return $content -}}

0 comments on commit 9460662

Please sign in to comment.