github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/shortcodes/include.html (about)

     1  {{- $page := .page }}
     2  {{- if and (not $page) .context }}
     3    {{- $page = .context }}
     4    {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'include' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
     5  {{- end }}
     6  {{- $file := .file }}
     7  {{- $hideFirstHeading := .hidefirstheading | default false }}
     8  {{- if eq (printf "%T" $hideFirstHeading) "string" }}
     9  	{{- $hideFirstHeading = (eq $hideFirstHeading "true") }}
    10  {{- end }}
    11  {{- if and (gt (len (trim $file " ")) 0) (fileExists $file) }}
    12  	{{- if $hideFirstHeading }}<div class="include hide-first-heading">
    13  
    14  {{ end }}
    15  	{{- with $page }}
    16  {{- $file | readFile | safeHTML }}
    17  	{{- end }}
    18  	{{- if $hideFirstHeading }}</div>{{ end }}
    19  {{- end }}