mirror of
https://github.com/adulau/mastodon-markdown-archive.git
synced 2024-12-04 15:57:17 +00:00
fix: [template] Change default hugo template to generate markdown - to
fix the issue with media description containing new-lines. Ref: https://codeberg.org/ggpsv/mastodon-markdown-archive/issues/1
This commit is contained in:
parent
d18757447e
commit
fc4484b10d
1 changed files with 46 additions and 44 deletions
|
@ -17,15 +17,17 @@ descendants:
|
||||||
- {{ .Id }}
|
- {{ .Id }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
layout: page
|
||||||
|
title: paperbay.org Mastodon - {{ .Post.URI }}
|
||||||
---
|
---
|
||||||
{{ .Post.Content | toMarkdown }}
|
{{ .Post.Content | toMarkdown }}
|
||||||
|
|
||||||
{{ 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 +37,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 }}
|
||||||
|
|
Loading…
Reference in a new issue