mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	post-meta: fix redundant '·'(separator) in end
when author is not present
This commit is contained in:
		| @@ -1,11 +1,17 @@ | |||||||
|  | {{- $scratch := newScratch}} | ||||||
|  |  | ||||||
| {{- if not .Date.IsZero -}} | {{- if not .Date.IsZero -}} | ||||||
| <time>{{- .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time> ·  | {{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }} | ||||||
| {{- end -}} | {{- end -}} | ||||||
|  |  | ||||||
| {{- if $.Site.Params.ShowReadingTime -}} | {{- if $.Site.Params.ShowReadingTime -}} | ||||||
| {{- i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime) }} ·  | {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }} | ||||||
| {{- end -}} | {{- end -}} | ||||||
|  |  | ||||||
| {{- if or .Params.author .Site.Params.author }} | {{- if or .Params.author .Site.Params.author }} | ||||||
| {{- printf "%s" (.Params.author | default .Site.Params.author) }} | {{- $scratch.Add "meta" (slice (.Params.author | default .Site.Params.author)) }} | ||||||
| {{- end -}} | {{- end -}} | ||||||
|  |  | ||||||
|  | {{- with ($scratch.Get "meta")}} | ||||||
|  | {{- delimit . " · "}} | ||||||
|  | {{- end }} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange