initial support for img (later vid) and its attributes...
This commit is contained in:
parent
c4a19635c7
commit
1757e61158
1 changed files with 6 additions and 1 deletions
|
@ -5,7 +5,12 @@
|
||||||
{{ $_.Add "triads" $k }}
|
{{ $_.Add "triads" $k }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if strings.HasPrefix .Destination "bib:" -}}
|
{{- if strings.HasPrefix .Destination "img:" -}}
|
||||||
|
{{- $img_params := (substr .Destination 4) -}}
|
||||||
|
{{- $img_src := index (split $img_params " ") 0 -}}
|
||||||
|
{{- $img_attr := index (split $img_params $img_src) 1 -}}
|
||||||
|
<img src="{{ $img_src }}" {{ $img_attr | safeHTMLAttr }} />
|
||||||
|
{{- else if strings.HasPrefix .Destination "bib:" -}}
|
||||||
{{- $destination := (substr .Destination 4) -}}
|
{{- $destination := (substr .Destination 4) -}}
|
||||||
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
|
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
|
||||||
{{- if index $.Page.Site.Data.books.catalog $destination -}}
|
{{- if index $.Page.Site.Data.books.catalog $destination -}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue