diff --git a/i18n/en.yaml b/i18n/en.yaml index bcb43484..b9903ae0 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -85,3 +85,20 @@ shortcode: recent: show_more: "Show More" + +admonition: + abstract: "Abstract" + bug: "Bug" + caution: "Caution" + danger: "Danger" + example: "Example" + failure: "Failure" + important: "Important" + info: "Info" + note: "Note" + question: "Question" + quote: "Quote" + success: "Success" + tip: "Tip" + todo: "Todo" + warning: "Warning" diff --git a/layouts/_default/_markup/render-blockquote.html b/layouts/_default/_markup/render-blockquote.html index 6a8e5afa..e68534dc 100644 --- a/layouts/_default/_markup/render-blockquote.html +++ b/layouts/_default/_markup/render-blockquote.html @@ -33,10 +33,10 @@ {{- $normalizedType := index $typeMap $rawType | default $rawType -}} {{- $iconName := .Attributes.icon | default (index $iconMap $normalizedType) | default "circle-info" -}} - {{- $admonitionTitle := .AlertTitle | default (i18n (printf "admonition.%s" $normalizedType) | default $normalizedType) -}} + {{- $admonitionTitle := .AlertTitle | default ((i18n (printf "admonition.%s" $normalizedType) | default $normalizedType) | title) -}} {{- $containerClass := "admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" -}} - {{- $headerClass := "flex items-center gap-2 font-semibold text-inherit capitalize" -}} + {{- $headerClass := "flex items-center gap-2 font-semibold text-inherit" -}} {{- $contentClass := "admonition-content mt-3 text-base leading-relaxed text-inherit" -}} {{- $isCollapsible := in (slice "+" "-") .AlertSign -}}