adding partials for <include>

This commit is contained in:
2026-03-28 02:00:49 +00:00
parent 077aa4b523
commit 319153c8c2
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{{- $path := .Get 0 -}}
{{- if not $path -}}
{{- $path = .Get "src" -}}
{{- end -}}
{{- if $path -}}
{{- partial "include.html" (dict "context" .Page "path" $path) -}}
{{- else -}}
{{- warnf "Shortcode 'include' called without path or src attribute." -}}
<p class="text-red-500 font-bold">[Include Error: No path provided]</p>
{{- end -}}