mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-22 03:19:25 +00:00
Use .InnerDeindent in inline shortcodes
This commit is contained in:
parent
2b7b9c3c79
commit
35bf672b70
@ -1,12 +1,12 @@
|
||||
{{ $ref := "" }}
|
||||
{{ $target := "" }}
|
||||
{{ with .Get "href" }}
|
||||
{{ $ref = . }}
|
||||
{{ $target = "_blank" }}
|
||||
{{ end }}
|
||||
{{ with .Get "relref" }}
|
||||
{{ $ref = relref $ . }}
|
||||
{{ end }}
|
||||
{{- $ref := "" }}
|
||||
{{- $target := "" -}}
|
||||
{{- with .Get "href" -}}
|
||||
{{- $ref = . -}}
|
||||
{{- $target = "_blank" -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "relref" -}}
|
||||
{{- $ref = relref $ . -}}
|
||||
{{- end -}}
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
{{ .InnerDeindent | .Page.RenderString }}
|
||||
</a>
|
||||
|
@ -2,6 +2,6 @@
|
||||
{{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}}
|
||||
<summary>{{ $summary | .Page.RenderString }}</summary>
|
||||
<div class="markdown-inner">
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
{{ .InnerDeindent | .Page.RenderString }}
|
||||
</div>
|
||||
</details>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<blockquote class="book-hint {{ .Get 0 }}">
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
{{ .InnerDeindent | .Page.RenderString }}
|
||||
</blockquote>
|
||||
|
Loading…
Reference in New Issue
Block a user