2023-06-25 20:35:54 +02:00
|
|
|
{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
|
2022-10-21 21:09:12 +02:00
|
|
|
{{- $fileUrlPath := path.Join .File.Path }}
|
|
|
|
|
|
|
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
|
|
|
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank">
|
|
|
|
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
|
|
|
</a>
|
|
|
|
{{- end }}
|