Something about the Devil's Slide photo post titles was causing Hugo to think it was too long. I don't know exactly what. Checking the plain version fixed it. Make sure to markdownify again for actual display though!
26 lines
1,000 B
HTML
26 lines
1,000 B
HTML
{{- $gridSize := $.Site.Params.photos.thumbnailSize -}}
|
|
|
|
{{- $thumbnail := partial "photostream/thumbnail.html" (dict "Page" . "Width" $gridSize "Height" $gridSize) -}}
|
|
{{- $thumbnail = $thumbnail.Crop (printf "%dx%d" $gridSize $gridSize) -}}
|
|
|
|
{{- $altText := $thumbnail.Params.alt -}}
|
|
|
|
{{- $linkTitle := .LinkTitle -}}
|
|
{{- $showsTitle := le (len ($linkTitle | plainify)) 18 -}}
|
|
{{- if not $showsTitle -}}
|
|
{{ warnf "Title for photostream item is too long for grid: %s" .Permalink }}
|
|
{{- end -}}
|
|
|
|
<article class="photostream-item">
|
|
{{ if $showsTitle }}
|
|
<h3 class="photostream-item__title">{{ $linkTitle | markdownify }}</h3>
|
|
{{ end }}
|
|
<a href="{{ .RelPermalink }}"
|
|
{{- if not $showsTitle }} title="{{ .Title | markdownify }}"{{ end }}>
|
|
<img
|
|
class="photostream-item__thumbnail"
|
|
src="{{ $thumbnail.RelPermalink }}"
|
|
{{- with $altText }} alt="{{ . }}"{{ end }}>
|
|
</a>
|
|
<time class="photostream-item__date">{{ .Date | time.Format "2006-01-02" }}</time>
|
|
</article>
|