feat(content): support complete local resource references (#388)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
{{- $href := "" -}}
|
||||
{{- with .url -}}
|
||||
{{- $href = . | relLangURL -}}
|
||||
{{- $destination := "" -}}
|
||||
{{- with .Url -}}
|
||||
{{- $destination = . | relLangURL -}}
|
||||
{{- else -}}
|
||||
{{- $template := .template | default "%v" -}}
|
||||
{{- with .prefix -}}
|
||||
{{- $template := .Template | default "%v" -}}
|
||||
{{- with .Prefix -}}
|
||||
{{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}}
|
||||
{{- end -}}
|
||||
{{- $href = printf (string $template) .id -}}
|
||||
{{- $destination = printf (string $template) .Id -}}
|
||||
{{- end -}}
|
||||
{{- dict "href" $href "rel" "me" | merge . | partial "plugin/link.html" -}}
|
||||
{{- dict "Destination" $destination "Rel" "me" | merge . | partial "plugin/link.html" -}}
|
||||
|
||||
Reference in New Issue
Block a user