Files
2026-01-02 22:07:38 +00:00

48 lines
1.5 KiB
HTML

{{/*
DEPRECATED: This shortcode is deprecated in favor of standard Markdown alert syntax.
Instead of:
{{< callout note >}}
Your content here
{{< /callout >}}
Use standard GitHub/Obsidian alert syntax:
> [!NOTE]
> Your content here
This provides better portability across Markdown platforms.
Docs: https://docs.hugoblox.com/reference/markdown/#callouts
Parameters
----------
#0 : optional, positional
Name of the icon to display in the callout component.
Default Hugo Blox Kit available options include "note" and "warning".
Otherwise, you can add your own icon to assets/media/icons/ and reference its name when calling the shortcode.
*/}}
{{/* Log deprecation warning */}}
{{ $src := "/" }}
{{ with .Page }}
{{ with .File }}
{{ $src = .Path }}
{{ end }}
{{ end }}
{{ partial "functions/logger" (dict
"page" .Page
"level" "warn"
"id" "callout-deprecated"
"message" (printf "The `callout` shortcode is deprecated in %s. Use standard Markdown alert syntax instead, such as `> [!NOTE]`." $src)
"source" (dict "type" "shortcode" "name" "callout" "docs" "https://docs.hugoblox.com/reference/markdown/#callouts")
) }}
{{/* Get callout type from parameter */}}
{{ $type := (.Get 0) | default "note" }}
{{/* Use shared callout renderer */}}
{{ partial "functions/render_callout" (dict
"type" $type
"content" (.Inner | markdownify | emojify)
"source" "shortcode"
) }}