mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Fix homepage photo caption
This commit is contained in:
parent
bf0186a315
commit
89c14e2dae
1 changed files with 2 additions and 2 deletions
|
@ -50,8 +50,8 @@
|
||||||
{{- $src := index $picPage.Params.Media 0 -}}
|
{{- $src := index $picPage.Params.Media 0 -}}
|
||||||
<a href="{{ .RelPermalink }}"><img src="{{ path.Join .RelPermalink $src.url }}" {{ with $src.alt }}alt="{{ . }}" {{ end }} /></a>
|
<a href="{{ .RelPermalink }}"><img src="{{ path.Join .RelPermalink $src.url }}" {{ with $src.alt }}alt="{{ . }}" {{ end }} /></a>
|
||||||
<figcaption>
|
<figcaption>
|
||||||
{{- $shortSummary := index (split .Summary "\n") 0 -}}
|
{{- $shortSummary := index (split .Summary "</p>") 0 -}}
|
||||||
{{- $shortSummary | htmlUnescape }}{{ if gt (len .Summary) (len $shortSummary) }} <a href="{{ .RelPermalink }}">→</a>{{ end -}}
|
{{- $shortSummary | plainify | htmlUnescape | strings.TrimSpace }} <a href="{{ .RelPermalink }}">→</a>
|
||||||
</figcaption>
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue