mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
bd40c85586
refactor admonition shortcode: add todo type and aliases type change min hugo version: 0.134.0
13 lines
363 B
HTML
13 lines
363 B
HTML
{{- $type := cond .IsNamedParams (.Get "type") (.Get 0) -}}
|
|
{{- $title := cond .IsNamedParams (.Get "title") (.Get 1) | .Page.RenderString -}}
|
|
{{- $open := cond .IsNamedParams (.Get "open") (.Get 2) -}}
|
|
{{- $inner := .Inner | .Page.RenderString -}}
|
|
|
|
{{- dict
|
|
"Type" $type
|
|
"Title" $title
|
|
"Open" $open
|
|
"Text" $inner
|
|
| partial "plugin/admonition.html"
|
|
-}}
|