summaryrefslogtreecommitdiff
path: root/layouts/partials/edit_post.html
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2025-09-01 11:27:12 -0700
committerrtk0c <[email protected]>2025-09-01 11:27:12 -0700
commit86b0d0c422e34c38837b5b5495ad6d295d0e73d2 (patch)
tree039e513e5cebe1ba60b747372b50d8049edf29ae /layouts/partials/edit_post.html
Squashed 'themes/PaperMod/' content from commit 5a46517
git-subtree-dir: themes/PaperMod git-subtree-split: 5a4651783fa9159123d947bd3511b355146d4797
Diffstat (limited to 'layouts/partials/edit_post.html')
-rw-r--r--layouts/partials/edit_post.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html
new file mode 100644
index 0000000..8d355d7
--- /dev/null
+++ b/layouts/partials/edit_post.html
@@ -0,0 +1,8 @@
+{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
+{{- $fileUrlPath := path.Join .File.Path }}
+
+{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}&nbsp;|&nbsp;{{- 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 edit" target="_blank">
+ {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
+</a>
+{{- end }}