Browse Source

refactor(layout/default): remove nested conditional added in 258c747

pointer assignments return nil by design https://github.com/golang/go/issues/30349

closes #136
updates #135
pull/149/head
Josh Habdas 1 year ago
parent
commit
852753f4fe
Signed by: jhabdas GPG Key ID: B148B31154C75A74
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      layouts/_default/rss.xml

+ 5
- 5
layouts/_default/rss.xml View File

@ -3,12 +3,12 @@
<docs>https://blogs.law.harvard.edu/tech/rss</docs>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>{{ if .Site.Params.images }}{{ if ge (len .Site.Params.images) 1 }}
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>{{ range first 1 (default slice .Site.Params.images) }}
<image>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<url>{{ index .Site.Params.images 0 }}</url>
</image>{{ end }}{{ end }}
<title>{{ if eq $.Title $.Site.Title }}{{ $.Site.Title }}{{ else }}{{ with $.Title }}{{ . }} on {{ end }}{{ $.Site.Title }}{{ end }}</title>
<link>{{ $.Permalink }}</link>
<url>{{ . }}</url>
</image>{{ end }}
<ttl>1440</ttl>
<generator>{{ with .Site.Data.npm.latest }}{{ .name | humanize | title }} {{ .version }} (Hugo {{ $.Hugo.Version }}){{ else }}Hugo {{ .Hugo.Version }}{{ end }}</generator>{{ with .Site.LanguageCode }}
<language>{{ . }}</language>{{ end }}{{ with .Site.Author }}

Loading…
Cancel
Save