feat: render templates in param strings
This commit is contained in:
parent
397774be5b
commit
dae35f0e05
1 changed files with 4 additions and 4 deletions
|
@ -13,8 +13,8 @@
|
|||
|
||||
<!-- Optional parameter overrides (for nested citations) -->
|
||||
|
||||
{{- $cite := default .Params.cite ( .Scratch.Get "cite" ) -}}
|
||||
{{- $title := default .Params.title ( .Scratch.Get "title" ) -}}
|
||||
{{- $cite := trim ( default .Params.cite ( .Scratch.Get "cite" ) | .Page.RenderString ) "\r\n" -}}
|
||||
{{- $title := trim ( default .Params.title ( .Scratch.Get "title" ) | .Page.RenderString ) "\r\n" -}}
|
||||
{{- $titleLang := default .Params.titleLang ( .Scratch.Get "titleLang" ) -}}
|
||||
{{- $titleTr := default .Params.titleTr ( .Scratch.Get "titleTr" ) -}}
|
||||
{{- $schemaType := default .Params.schemaType ( .Scratch.Get "schemaType" ) -}}
|
||||
|
@ -49,7 +49,7 @@
|
|||
{{- $itemType := default "CreativeWork" $schemaType -}}
|
||||
{{- if ( or ( in $.Site.Data.itemtypes $itemType ) ( eq .Params.suppress "true" ) ) -}}
|
||||
{{- with .Params.href -}}
|
||||
<a href="{{ if eq . "asCite" }}{{ $cite }}{{ else }}{{ . }}{{ end }}">
|
||||
<a href="{{- if eq . "asCite" -}}{{- $cite -}}{{- else -}}{{- . -}}{{- end -}}">
|
||||
{{- end -}}
|
||||
<cite
|
||||
class="cite{{ with .Params.citeStyle }} cite--{{ . }}{{ end }}"
|
||||
|
@ -61,7 +61,7 @@
|
|||
title="{{- $titleTr -}}"
|
||||
{{- end -}}>
|
||||
{{- with $cite -}}
|
||||
<meta itemprop="url" content="{{ . }}">
|
||||
<meta itemprop="url" content="{{- . -}}">
|
||||
{{- end -}}
|
||||
<span itemprop="name">
|
||||
{{- if $titleLang -}}
|
||||
|
|
Loading…
Add table
Reference in a new issue