Fix untitled tites

This commit is contained in:
JP Hastings-Spital 2023-09-15 07:28:11 +01:00
parent f36eb1e6d9
commit fbe0aec3ea
3 changed files with 9 additions and 9 deletions

View file

@ -1,4 +1,5 @@
---
title: Site content licence
type: timeless
_build:
list: never

View file

@ -22,7 +22,7 @@
<li class="post-item">
<a href="{{.Permalink}}">
{{ if .Params.emoji }}<span class="post-emoji">{{ .Params.emoji }}</span>{{ end }}
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled post</i>{{ end }}</span>
<span class="post-title">{{ if .Title }}{{.Title}}{{ else }}<i>Untitled {{ .Type | singularize -}}</i>{{ end }}</span>
<span class="post-day">
{{ if .Site.Params.dateformShort }}
{{ .Date.Format .Site.Params.dateformShort }}

View file

@ -11,16 +11,15 @@
<link rel="authorization_endpoint" href="https://indieauth.com/auth" />
<link rel="token_endpoint" href="https://tokens.indieauth.com/token" />
<link rel="webmention" href="https://webmention.io/www.byjp.me/webmention" />
{{ block "title" . }}
{{ block "title" . -}}
<title>
{{ if .IsHome }}
{{ $.Site.Title }}
{{ else }}
{{if .Title }}{{ .Title }}{{ else }}Untitled post{{ end }}, {{ $.Site.Title }}
{{ end }}
{{- if .IsHome -}}
{{- $.Site.Title -}}
{{- else -}}
{{- if .Title -}}{{- .Title -}}{{- else -}}Untitled {{ $.Type | singularize -}}{{- end -}}, {{ $.Site.Title -}}
{{- end -}}
</title>
{{ end }}
{{- end }}
<!-- CSS -->
{{/* <link href="/css/flags.css" rel="stylesheet" type="text/css"> */}}