mirror of
				https://github.com/adityatelange/hugo-PaperMod.git
				synced 2025-11-04 02:12:49 +01:00 
			
		
		
		
	fix: edit_post fileUrlPath with contentDir configed
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
 | 
					{{- 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 -}}
 | 
					{{- 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">
 | 
					<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">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user