feat: render markdown in shortcodes

This commit is contained in:
Gerkin 2022-03-28 17:37:26 +02:00
parent 01f9e43e59
commit cda0c67a4b
9 changed files with 12 additions and 12 deletions

View File

@ -1 +1 @@
<div class="alert {{ with .Get "theme" }}alert-{{.}}{{ end }}" role="alert" data-dir="{{ with .Get "dir" }}{{.}}{{ else }}ltr{{ end }}">{{ .Inner | markdownify }}</div>
<div class="alert {{ with .Get "theme" }}alert-{{.}}{{ end }}" role="alert" data-dir="{{ with .Get "dir" }}{{.}}{{ else }}ltr{{ end }}">{{ .Inner | .Page.RenderString }}</div>

View File

@ -1 +1 @@
<div class="box">{{ .Inner | markdownify }}</div>
<div class="box">{{ .Inner | .Page.RenderString }}</div>

View File

@ -1,5 +1,5 @@
<a href="{{ .Get "href" | default "#" }}" class="button" style="width: {{ .Get "width" | default "72px" }}; height: {{ .Get "height" | default "30px" }};" data-color="{{ .Get "color" | default "default" }}" target="_blank" rel="noreferrer">
<span class="button__text">
{{ .Inner | markdownify }}
{{ .Inner | .Page.RenderString }}
</span>
</a>

View File

@ -1,4 +1,4 @@
{{ $id := substr (md5 .Inner) 0 16 }}
<div id="{{ $id }}" class="codetab__content">
{{ .Inner | markdownify }}
{{ .Inner | .Page.RenderString }}
</div>

View File

@ -1 +1 @@
<span style="color: {{ .Get 0 | default "#f48fb1" }}">{{ .Inner | markdownify }}</span>
<span style="color: {{ .Get 0 | default "#f48fb1" }}">{{ .Inner | .Page.RenderString }}</span>

View File

@ -6,6 +6,6 @@
{{ .Get 0 }}
</button>
<div class="expand__content">
{{ .Inner | markdownify }}
{{ .Inner | .Page.RenderString }}
</div>
</div>

View File

@ -1,3 +1,3 @@
<div class="notices {{ .Get 0 }}" data-title="{{ .Get 1 | default (.Get 0) | humanize }}">
{{ .Inner | markdownify }}
{{ .Inner | .Page.RenderString }}
</div>

View File

@ -1,5 +1,5 @@
<div class="swiper-slide" data-align="{{ .Get "align" | default "center" }}">
<div class="swiper-slide__inner">
{{ .Inner | markdownify }}
</div>
<div class="swiper-slide" data-align="{{ .Get "align" | default "center" }}">
<div class="swiper-slide__inner">
{{ .Inner | .Page.RenderString }}
</div>
</div>

View File

@ -1,4 +1,4 @@
{{ $id := substr (md5 .Inner) 0 16 }}
<div id="{{ $id }}" class="tab__content">
{{ .Inner | markdownify }}
{{ .Inner | .Page.RenderString }}
</div>