mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-25 07:48:54 +00:00
⚡ Perf: use .RenderString instead of markdownify (#105)
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
{{- $type := .Get "type" | default "note" -}}
|
||||
<div class="details admonition {{ $type }}{{ if .Get `open` | ne false }} open{{ end }}">
|
||||
<div class="details-summary admonition-title">
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get "title" | markdownify | default (T $type) }}<i class="details-icon {{ $iconDetails }}"></i>
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get "title" | .Page.RenderString | default (T $type) }}<i class="details-icon {{ $iconDetails }}"></i>
|
||||
</div>
|
||||
<div class="details-content">
|
||||
<div class="admonition-content">
|
||||
@@ -30,7 +30,7 @@
|
||||
{{- $type := .Get 0 | default "note" -}}
|
||||
<div class="details admonition {{ $type }}{{ if .Get 2 | ne false }} open{{ end }}">
|
||||
<div class="details-summary admonition-title">
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get 1 | markdownify | default (T $type) }}<i class="details-icon {{ $iconDetails }}"></i>
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}"></i>{{ .Get 1 | .Page.RenderString | default (T $type) }}<i class="details-icon {{ $iconDetails }}"></i>
|
||||
</div>
|
||||
<div class="details-content">
|
||||
<div class="admonition-content">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<details>
|
||||
<summary>{{ .Get "summary" | default (.Get 0) | markdownify }}</summary>
|
||||
{{ .Inner | markdownify }}
|
||||
<summary>{{ .Get "summary" | default (.Get 0) | .Page.RenderString }}</summary>
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
</details>
|
||||
Reference in New Issue
Block a user