A fast and simple blog backend.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
mediocre-blog/src/gmi/tpl/posts/post.gmi

33 lines
834 B

{{ $post := .GetPostByID (.GetQueryValue "id" "") -}}
# {{ $post.Title }}
{{ if ne $post.Description "" -}}
> {{ $post.Description }}
{{ end -}}
{{ .PostBody $post }}
--------------------------------------------------------------------------------
Published {{ $post.PublishedAt.Format "2006-01-02" }}
{{- if $post.Series }}
This post is part of a series!
{{ $seriesNextPrev := .GetPostSeriesNextPrevious $post -}}
{{ if $seriesNextPrev.Next -}}
=> {{ BlogURL "posts" }}/{{ $seriesNextPrev.Next.ID }}.gmi Next in the series: {{ $seriesNextPrev.Next.Title }}
{{ end -}}
{{ if $seriesNextPrev.Previous -}}
=> {{ BlogURL "posts" }}/{{ $seriesNextPrev.Previous.ID }}.gmi Prevous in the series: {{ $seriesNextPrev.Previous.Title }}
{{ end -}}
{{ end }}
=> {{ BlogURL "posts/" }} Browse all posts
{{ template "footer.gmi" . }}