Skip to content

Commit

Permalink
deps: bump hugo from 0.90.0 to 0.90.1 (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Dec 13, 2021
1 parent a766c92 commit 6d32177
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 108 deletions.
Empty file added exampleSite/.hugo_build.lock
Empty file.
76 changes: 40 additions & 36 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,52 @@
{{ end }}

{{ with resources.Get $imagePath }}
{{ $image := . }}
{{ with .Err }}
{{ warnf "%s" . }}
{{ else }}
{{ $image := . }}

{{ $smallJPG := $image }}
{{ $mediumJPG := $image }}
{{ $largeJPG := $image }}
{{ $smallJPG := $image }}
{{ $mediumJPG := $image }}
{{ $largeJPG := $image }}

{{ $smallWebP := $image }}
{{ $mediumWebP := $image }}
{{ $largeWebP := $image }}
{{ $smallWebP := $image }}
{{ $mediumWebP := $image }}
{{ $largeWebP := $image }}

{{ $smallJPG = $image.Resize "480x jpg" }}
{{ $mediumJPG = $image.Resize "768x jpg" }}
{{ $largeJPG = $image.Resize "1024x jpg" }}
{{ $smallJPG = $image.Resize "480x jpg" }}
{{ $mediumJPG = $image.Resize "768x jpg" }}
{{ $largeJPG = $image.Resize "1024x jpg" }}

{{ if hugo.IsExtended }}
{{ $smallWebP = $image.Resize "480x webp" }}
{{ $mediumWebP = $image.Resize "768x webp" }}
{{ $largeWebP = $image.Resize "1024x webp" }}
{{ end }}
{{ if hugo.IsExtended }}
{{ $smallWebP = $image.Resize "480x webp" }}
{{ $mediumWebP = $image.Resize "768x webp" }}
{{ $largeWebP = $image.Resize "1024x webp" }}
{{ end }}

<figure class="image container">
<picture>
{{ if hugo.IsExtended }}
<source type="image/webp" media="(max-width: 480px)" srcset="{{ $smallWebP.RelPermalink }} 480w">
<source type="image/webp" media="(max-width: 768px)" srcset="{{ $mediumWebP.RelPermalink }} 768w">
<source type="image/webp" media="(max-width: 1024px)" srcset="{{ $largeWebP.RelPermalink }} 1024w">
{{ end }}
<figure class="image container">
<picture>
{{ if hugo.IsExtended }}
<source type="image/webp" media="(max-width: 480px)" srcset="{{ $smallWebP.RelPermalink }} 480w">
<source type="image/webp" media="(max-width: 768px)" srcset="{{ $mediumWebP.RelPermalink }} 768w">
<source type="image/webp" media="(max-width: 1024px)" srcset="{{ $largeWebP.RelPermalink }} 1024w">
{{ end }}

<source type="image/jpeg" media="(max-width: 480px)" srcset="{{ $smallJPG.RelPermalink }} 480w">
<source type="image/jpeg" media="(max-width: 768px)" srcset="{{ $mediumJPG.RelPermalink }} 768w">
<source type="image/jpeg" media="(max-width: 1024px)" srcset="{{ $largeJPG.RelPermalink }} 1024w">
<img
src="{{ $largeJPG.RelPermalink }}"
alt="{{ $caption }}"
decoding="async"
loading="lazy"
/>
</picture>
{{ with $caption }}
<figcaption class="has-text-centered mt-2">{{ . }}</figcaption>
{{ end }}
</figure>
<source type="image/jpeg" media="(max-width: 480px)" srcset="{{ $smallJPG.RelPermalink }} 480w">
<source type="image/jpeg" media="(max-width: 768px)" srcset="{{ $mediumJPG.RelPermalink }} 768w">
<source type="image/jpeg" media="(max-width: 1024px)" srcset="{{ $largeJPG.RelPermalink }} 1024w">
<img
src="{{ $largeJPG.RelPermalink }}"
alt="{{ $caption }}"
decoding="async"
loading="lazy"
/>
</picture>
{{ with $caption }}
<figcaption class="has-text-centered mt-2">{{ . }}</figcaption>
{{ end }}
</figure>
{{ end }}
{{ else }}
<figure class="image container">
<img
Expand Down
72 changes: 38 additions & 34 deletions layouts/partials/eyecatch.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,49 @@
{{ end }}

{{ with resources.Get $imagePath }}
{{ $image := . }}
{{ with .Err }}
{{ warnf "%s" . }}
{{ else }}
{{ $image := . }}

{{ $smallJPG := $image }}
{{ $mediumJPG := $image }}
{{ $largeJPG := $image }}
{{ $smallJPG := $image }}
{{ $mediumJPG := $image }}
{{ $largeJPG := $image }}

{{ $smallWebP := $image }}
{{ $mediumWebP := $image }}
{{ $largeWebP := $image }}
{{ $smallWebP := $image }}
{{ $mediumWebP := $image }}
{{ $largeWebP := $image }}

{{ $smallJPG = $image.Resize "480x jpg" }}
{{ $mediumJPG = $image.Resize "768x jpg" }}
{{ $largeJPG = $image.Resize "1024x jpg" }}
{{ $smallJPG = $image.Resize "480x jpg" }}
{{ $mediumJPG = $image.Resize "768x jpg" }}
{{ $largeJPG = $image.Resize "1024x jpg" }}

{{ if hugo.IsExtended }}
{{ $smallWebP = $image.Resize "480x webp" }}
{{ $mediumWebP = $image.Resize "768x webp" }}
{{ $largeWebP = $image.Resize "1024x webp" }}
{{ end }}
{{ if hugo.IsExtended }}
{{ $smallWebP = $image.Resize "480x webp" }}
{{ $mediumWebP = $image.Resize "768x webp" }}
{{ $largeWebP = $image.Resize "1024x webp" }}
{{ end }}

<figure class="image container">
<picture>
{{ if hugo.IsExtended }}
<source type="image/webp" media="(max-width: 480px)" srcset="{{ $smallWebP.RelPermalink }} 480w">
<source type="image/webp" media="(max-width: 768px)" srcset="{{ $mediumWebP.RelPermalink }} 768w">
<source type="image/webp" media="(max-width: 1024px)" srcset="{{ $largeWebP.RelPermalink }} 1024w">
{{ end }}

<source type="image/jpeg" media="(max-width: 480px)" srcset="{{ $smallJPG.RelPermalink }} 480w">
<source type="image/jpeg" media="(max-width: 768px)" srcset="{{ $mediumJPG.RelPermalink }} 768w">
<source type="image/jpeg" media="(max-width: 1024px)" srcset="{{ $largeJPG.RelPermalink }} 1024w">
<img
src="{{ $largeJPG.RelPermalink }}"
alt="{{ $.Params.Description }}"
decoding="async"
loading="lazy"
/>
</picture>
</figure>
<figure class="image container">
<picture>
{{ if hugo.IsExtended }}
<source type="image/webp" media="(max-width: 480px)" srcset="{{ $smallWebP.RelPermalink }} 480w">
<source type="image/webp" media="(max-width: 768px)" srcset="{{ $mediumWebP.RelPermalink }} 768w">
<source type="image/webp" media="(max-width: 1024px)" srcset="{{ $largeWebP.RelPermalink }} 1024w">
{{ end }}

<source type="image/jpeg" media="(max-width: 480px)" srcset="{{ $smallJPG.RelPermalink }} 480w">
<source type="image/jpeg" media="(max-width: 768px)" srcset="{{ $mediumJPG.RelPermalink }} 768w">
<source type="image/jpeg" media="(max-width: 1024px)" srcset="{{ $largeJPG.RelPermalink }} 1024w">
<img
src="{{ $largeJPG.RelPermalink }}"
alt="{{ $.Params.Description }}"
decoding="async"
loading="lazy"
/>
</picture>
</figure>
{{ end }}
{{ else }}
<figure class="image container">
<img
Expand Down
8 changes: 6 additions & 2 deletions layouts/partials/head/ogp.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{{ $imagePath := "" }}
{{ if $.Params.eyecatch }}
{{ with resources.Get $.Params.eyecatch }}
{{ $image := . }}
{{ $imagePath = ($image | resources.Fingerprint "sha512").Permalink }}
{{ with .Err }}
{{ warnf "%s" . }}
{{ else }}
{{ $image := . }}
{{ $imagePath = ($image | resources.Fingerprint "sha512").Permalink }}
{{ end }}
{{ else }}
{{ $imagePath = $.Params.eyecatch }}
{{ end }}
Expand Down
76 changes: 40 additions & 36 deletions layouts/shortcodes/circle.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,52 @@
{{ end }}

{{ with resources.Get $imagePath }}
{{ $image := . }}
{{ with .Err }}
{{ warnf "%s" . }}
{{ else }}
{{ $image := . }}

{{ $smallJPG := $image }}
{{ $mediumJPG := $image }}
{{ $largeJPG := $image }}
{{ $smallJPG := $image }}
{{ $mediumJPG := $image }}
{{ $largeJPG := $image }}

{{ $smallWebP := $image }}
{{ $mediumWebP := $image }}
{{ $largeWebP := $image }}
{{ $smallWebP := $image }}
{{ $mediumWebP := $image }}
{{ $largeWebP := $image }}

{{ $smallJPG = $image.Resize "480x jpg" }}
{{ $mediumJPG = $image.Resize "768x jpg" }}
{{ $largeJPG = $image.Resize "1024x jpg" }}
{{ $smallJPG = $image.Resize "480x jpg" }}
{{ $mediumJPG = $image.Resize "768x jpg" }}
{{ $largeJPG = $image.Resize "1024x jpg" }}

{{ if hugo.IsExtended }}
{{ $smallWebP = $image.Resize "480x webp" }}
{{ $mediumWebP = $image.Resize "768x webp" }}
{{ $largeWebP = $image.Resize "1024x webp" }}
{{ end }}
{{ if hugo.IsExtended }}
{{ $smallWebP = $image.Resize "480x webp" }}
{{ $mediumWebP = $image.Resize "768x webp" }}
{{ $largeWebP = $image.Resize "1024x webp" }}
{{ end }}

<br>
<figure class="image is-180x180 container">
<picture>
{{ if hugo.IsExtended }}
<source type="image/webp" media="(max-width: 480px)" srcset="{{ $smallWebP.RelPermalink }} 480w">
<source type="image/webp" media="(max-width: 768px)" srcset="{{ $mediumWebP.RelPermalink }} 768w">
<source type="image/webp" media="(max-width: 1024px)" srcset="{{ $largeWebP.RelPermalink }} 1024w">
{{ end }}
<br>
<figure class="image is-180x180 container">
<picture>
{{ if hugo.IsExtended }}
<source type="image/webp" media="(max-width: 480px)" srcset="{{ $smallWebP.RelPermalink }} 480w">
<source type="image/webp" media="(max-width: 768px)" srcset="{{ $mediumWebP.RelPermalink }} 768w">
<source type="image/webp" media="(max-width: 1024px)" srcset="{{ $largeWebP.RelPermalink }} 1024w">
{{ end }}

<source type="image/jpeg" media="(max-width: 480px)" srcset="{{ $smallJPG.RelPermalink }} 480w">
<source type="image/jpeg" media="(max-width: 768px)" srcset="{{ $mediumJPG.RelPermalink }} 768w">
<source type="image/jpeg" media="(max-width: 1024px)" srcset="{{ $largeJPG.RelPermalink }} 1024w">
<img
class="is-rounded"
src="{{ $largeJPG.RelPermalink }}"
alt="{{ $alt | safeHTMLAttr }}"
decoding="async"
loading="lazy"
/>
</picture>
</figure>
<br>
<source type="image/jpeg" media="(max-width: 480px)" srcset="{{ $smallJPG.RelPermalink }} 480w">
<source type="image/jpeg" media="(max-width: 768px)" srcset="{{ $mediumJPG.RelPermalink }} 768w">
<source type="image/jpeg" media="(max-width: 1024px)" srcset="{{ $largeJPG.RelPermalink }} 1024w">
<img
class="is-rounded"
src="{{ $largeJPG.RelPermalink }}"
alt="{{ $alt | safeHTMLAttr }}"
decoding="async"
loading="lazy"
/>
</picture>
</figure>
<br>
{{ end }}
{{ else }}
<br>
<figure class="image is-180x180 container">
Expand Down

0 comments on commit 6d32177

Please sign in to comment.