Skip to content

Commit

Permalink
website: add sha1sum as a version to the img url
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tsien <[email protected]>
  • Loading branch information
bekcpear committed Aug 12, 2024
1 parent 4979ad0 commit a82f170
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/index-sections/exhibition.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>{{ .Title | markdownify | emojify }}</h1>
<div class="exhibition-images">
{{ range .Params.summary_image }}
<figure>
<img src="{{ .url }}"/>
<img src="{{ (printf "%s?v=%s" .url (readFile (printf "static%s" .url) | sha1) ) }}" />
<figcaption>{{ .description }}</figcaption>
</figure>
{{ end }}
Expand Down
18 changes: 9 additions & 9 deletions layouts/partials/index-sections/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2>{{ i18n "diamond" }}</h2>
<div class="sponsors-container diamond">
{{ range .Params.diamond }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -18,7 +18,7 @@ <h2>{{ i18n "gold" }}</h2>
<div class="sponsors-container gold">
{{ range .Params.gold }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -28,7 +28,7 @@ <h2>{{ i18n "silver" }}</h2>
<div class="sponsors-container silver">
{{ range .Params.silver }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -38,7 +38,7 @@ <h2>{{ i18n "bronze" }}</h2>
<div class="sponsors-container bronze">
{{ range .Params.bronze }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -48,7 +48,7 @@ <h2>{{ i18n "community" }}</h2>
<div class="sponsors-container community">
{{ range .Params.community }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -59,7 +59,7 @@ <h2>{{ i18n "host" }}</h2>
<div class="sponsors-container host">
{{ range .Params.host }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -69,7 +69,7 @@ <h2>{{ i18n "co_host" }}</h2>
<div class="sponsors-container co-hosts">
{{ range .Params.co_hosts }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -79,7 +79,7 @@ <h2>{{ i18n "organizer" }}</h2>
<div class="sponsors-container organizers">
{{ range .Params.organizers }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand All @@ -89,7 +89,7 @@ <h2>{{ i18n "co_organizer" }}</h2>
<div class="sponsors-container co-organizers">
{{ range .Params.co_organizers }}
<a target="_blank" href="{{ .url }}">
<img src="{{ .icon }}" />
<img src="{{ (printf "%s?v=%s" .icon (readFile (printf "static%s" .icon) | sha1) ) }}" />
</a>
{{ end }}
</div>
Expand Down

0 comments on commit a82f170

Please sign in to comment.