add condition to disable edit post on md file

This commit is contained in:
douglastofoli 2023-01-23 19:16:04 -03:00
parent d3d90be8a4
commit 87ee72b87d
No known key found for this signature in database
GPG Key ID: FB53E61DAF3115F8

View File

@ -1,3 +1,4 @@
{{- if not (or .Params.editPost.disable site.Params.editPost.disable) -}}
{{- if or .Params.editPost.URL site.Params.editPost.URL -}} {{- if or .Params.editPost.URL site.Params.editPost.URL -}}
{{- $fileUrlPath := path.Join .File.Path }} {{- $fileUrlPath := path.Join .File.Path }}
@ -6,3 +7,4 @@
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
</a> </a>
{{- end }} {{- end }}
{{- end }}