mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
fix: edit_post fileUrlPath with contentDir configed
This commit is contained in:
parent
4a924cef54
commit
6bbe4c0134
@ -1,5 +1,5 @@
|
||||
{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
|
||||
{{- $fileUrlPath := path.Join .File.Path }}
|
||||
{{- $fileUrlPath := path.Clean (path.Join (.Param "contentDir") .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">
|
||||
|
Loading…
Reference in New Issue
Block a user