From 81673792b398e611372b4b8aa38f1988e0bfdd36 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Tue, 3 Sep 2024 06:17:21 +0200 Subject: [PATCH] chg: [template] added the foo.be template --- files/templates/foo.tmpl | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 files/templates/foo.tmpl diff --git a/files/templates/foo.tmpl b/files/templates/foo.tmpl new file mode 100644 index 0000000..1e91c12 --- /dev/null +++ b/files/templates/foo.tmpl @@ -0,0 +1,46 @@ +--- +date: {{ .Post.CreatedAt }} +{{- if .Post.InReplyToId }} +in_reply_to: {{ .Post.InReplyToId }} +{{- end }} +post_uri: {{ .Post.URI }} +post_id: {{ .Post.Id }} +{{- if len .Post.AllTags }} +tags: +{{- range .Post.AllTags }} +- {{ .Name }} +{{- end }} +{{- end }} +{{- if len .Post.Descendants }} +descendants: +{{- range .Post.Descendants }} +- {{ .Id }} +{{- end }} +{{- end }} +layout: page +title: paperbay.org Mastodon - {{ .Post.URI }} +--- +{{ .Post.Content | toMarkdown }} + +{{ range .Post.MediaAttachments }} +{{- if eq .Type "image" }} +{{- if .Path }} +![{{ .Description | replace "\n" "" }}]({{ osBase .Path }}) +{{- else }} +![{{ .Description | replace "\n" "" }}]({{ .URL }}) +{{- end }} +{{ end }} +{{- end -}} + +{{ range .Post.Descendants }} +{{ .Content | toMarkdown }} +{{ range .MediaAttachments }} +{{- if eq .Type "image" }} +{{- if .Path }} +![{{ .Description | replace "\n" ""}}]({{ osBase .Path }}) +{{- else }} +![{{ .Description | replace "\n" ""}}]({{ .URL }}) +{{- end }} +{{- end }} +{{- end }} +{{- end }}