summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/partials/edit_post.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html
index 21a33eb..d905b32 100644
--- a/layouts/partials/edit_post.html
+++ b/layouts/partials/edit_post.html
@@ -1,6 +1,7 @@
{{- if or .Params.editPost.URL .Site.Params.editPost.URL -}}
+{{- $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 ) }}/{{ .File.Path }}{{ end }}" rel="noopener noreferrer" target="_blank">
+<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 }}