mirror of
https://github.com/adulau/mastodon-markdown-archive.git
synced 2024-11-21 09:27:05 +00:00
chg: [template] added the foo.be template
This commit is contained in:
parent
94b45ca42e
commit
81673792b3
1 changed files with 46 additions and 0 deletions
46
files/templates/foo.tmpl
Normal file
46
files/templates/foo.tmpl
Normal file
|
@ -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 }}
|
Loading…
Reference in a new issue