Replace alt text newlines in default post template

This commit is contained in:
Gabriel Garrido 2024-09-01 12:09:03 -06:00
parent d18757447e
commit 797ccfcb6d

View file

@ -23,9 +23,9 @@ descendants:
{{ range .Post.MediaAttachments }} {{ range .Post.MediaAttachments }}
{{- if eq .Type "image" }} {{- if eq .Type "image" }}
{{- if .Path }} {{- if .Path }}
![{{ .Description }}]({{ osBase .Path }}) ![{{ .Description | replace "\n" "" }}]({{ osBase .Path }})
{{- else }} {{- else }}
![{{ .Description }}]({{ .URL }}) ![{{ .Description | replace "\n" "" }}]({{ .URL }})
{{- end }} {{- end }}
{{ end }} {{ end }}
{{- end -}} {{- end -}}
@ -35,9 +35,9 @@ descendants:
{{ range .MediaAttachments }} {{ range .MediaAttachments }}
{{- if eq .Type "image" }} {{- if eq .Type "image" }}
{{- if .Path }} {{- if .Path }}
![{{ .Description }}]({{ osBase .Path }}) ![{{ .Description | replace "\n" "" }}]({{ osBase .Path }})
{{- else }} {{- else }}
![{{ .Description }}]({{ .URL }}) ![{{ .Description | replace "\n" ""}}]({{ .URL }})
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}