2023-04-01 21:04:56 +02:00
|
|
|
{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
|
2023-06-20 10:26:00 +02:00
|
|
|
{{- $fileUrlPath := path.Clean (path.Join (.Param "contentDir") .File.Path) }}
|
2021-03-30 14:37:36 +02:00
|
|
|
|
2022-03-27 15:14:06 +02:00
|
|
|
{{- 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")) -}}
|
2021-03-23 10:28:26 +01:00
|
|
|
</a>
|
|
|
|
{{- end }}
|