mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 03:19:25 +00:00
#370: Allow markdown in details shortcode, also change markdownify to RenderString in other shortcodes
This commit is contained in:
parent
4c1de2b3de
commit
0cde2e461d
@ -8,5 +8,5 @@
|
||||
{{ $ref = relref $ . }}
|
||||
{{ end }}
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ $.Inner | markdownify }}
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
</a>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}>
|
||||
<summary>{{ cond .IsNamedParams (.Get "title") (.Get 0) }}</summary>
|
||||
{{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}}
|
||||
<summary>{{ $summary | .Page.RenderString }}</summary>
|
||||
<div class="markdown-inner">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
</div>
|
||||
</details>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<blockquote class="book-hint {{ .Get 0 }}">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
</blockquote>
|
||||
|
@ -9,7 +9,7 @@
|
||||
{{- $tab.Name -}}
|
||||
</label>
|
||||
<div class="book-tabs-content markdown-inner">
|
||||
{{- .Content | markdownify -}}
|
||||
{{- .Content | $.Page.RenderString -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user