2020-05-28 11:05:37 +02:00
|
|
|
{{- $destination := cond .IsNamedParams (.Get "href") (.Get 0) -}}
|
|
|
|
{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
|
|
|
|
{{- $destination = .RelPermalink -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $options := dict "Destination" $destination -}}
|
2020-03-17 14:16:04 +01:00
|
|
|
{{- if .IsNamedParams -}}
|
2020-05-28 11:05:37 +02:00
|
|
|
{{- $options = dict "Content" (.Get "content") | merge $options -}}
|
|
|
|
{{- $options = dict "Title" (.Get "title") | merge $options -}}
|
|
|
|
{{- $options = dict "Class" (.Get "class") | merge $options -}}
|
|
|
|
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
|
2020-03-17 14:16:04 +01:00
|
|
|
{{- else -}}
|
2020-05-28 11:05:37 +02:00
|
|
|
{{- $options = dict "Content" (.Get 1 | default (.Get 0)) | merge $options -}}
|
|
|
|
{{- $options = dict "Title" (.Get 2) | merge $options -}}
|
2020-03-17 14:16:04 +01:00
|
|
|
{{- end -}}
|
|
|
|
{{- partial "plugin/link.html" $options -}}
|