feat(content): support complete local resource references (#388)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{{- with .Title -}}
|
||||
{{- if .Title -}}
|
||||
<figure>
|
||||
{{- dict "src" $.Destination "alt" $.Text "caption" . "linked" true | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
|
||||
<figcaption class="image-caption">
|
||||
{{- . | safeHTML -}}
|
||||
{{- .Title | safeHTML -}}
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{- else -}}
|
||||
{{- dict "src" .Destination "alt" .Text | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" .Destination "Title" .Text "Resources" .Page.Resources | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
{{- $options := dict "href" .Destination "title" .Title "content" .Text -}}
|
||||
{{- $destination := .Destination -}}
|
||||
{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
|
||||
{{- $destination = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $options := dict "Destination" $destination "Title" .Title "Content" .Text -}}
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
|
||||
Reference in New Issue
Block a user