Skip to content

Commit

Permalink
Fixed description for exhibitions
Browse files Browse the repository at this point in the history
  • Loading branch information
spolischook committed Mar 10, 2024
1 parent 61ff41c commit ffc4597
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/exhibitions/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
{{ $image := .Resources.GetMatch .Params.afisha }}
<meta property="og:image" content="{{$image.RelPermalink}}" />
{{ end }}
<meta property="description" content="{{ .Content | plainify | truncate 155 | print "..." }}">
{{- $description := .Content | plainify | truncate 155 -}}
<meta property="description" content="{{ partial "entities_text.html" (dict "Text" $description) }}">
{{ end }}

{{ define "main" }}
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/entities_text.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- $s := .Text -}}
{{- $s = replace $s "&amp;ldquo;" "“" -}}
{{- $s = replace $s "&amp;rdquo;" "”" -}}
{{- $s = replace $s "&amp;lsquo;" "‘" -}}
{{- $s = replace $s "&amp;rsquo;" "’" -}}
{{- $s = replace $s "&amp;ndash;" "–" -}}
{{- $s = replace $s "&amp;mdash;" "—" -}}
{{- $s = replace $s "&amp;hellip;" "…" -}}
{{- $s -}}

0 comments on commit ffc4597

Please sign in to comment.