@thulite/images 3.3.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @thulite/images
2
2
 
3
+ ## 3.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#35](https://github.com/thuliteio/images/pull/35) [`1bd95c8`](https://github.com/thuliteio/images/commit/1bd95c8873fc6ccad4899a0f9361dbbf11120ed9) Thanks [@h-enk](https://github.com/h-enk)! - Update for new template system in Hugo v0.146.0
8
+
9
+ - [#32](https://github.com/thuliteio/images/pull/32) [`c1a4f79`](https://github.com/thuliteio/images/commit/c1a4f79994237373ee91b0c109ed7ad7e6306908) Thanks [@danielfdickinson](https://github.com/danielfdickinson)! - Fix invalid HTML on img tag for render hook
10
+
11
+ ## 3.3.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#27](https://github.com/thuliteio/images/pull/27) [`7914bea`](https://github.com/thuliteio/images/commit/7914beae806d9478a9e4d7d06ee097409984281c) Thanks [@toby-marks](https://github.com/toby-marks)! - Correcting for errors introduced by Hugo 0.141
16
+
3
17
  ## 3.3.0
4
18
 
5
19
  ### Minor Changes
@@ -104,14 +104,14 @@ partial template, after the render hook has captured the resource.
104
104
  {{- /* Get image resource. */}}
105
105
  {{- $r := "" }}
106
106
  {{- if $u.IsAbs }}
107
- {{- with resources.GetRemote $u.String }}
107
+ {{- with try (resources.GetRemote $u.String) }}
108
108
  {{- with .Err }}
109
109
  {{- if eq $errorLevel "warning" }}
110
- {{- warnf "%s. See %s" . $contentPath }}
110
+ {{- warnf "%s. See %s" .Err $contentPath }}
111
111
  {{- else if eq $errorLevel "error" }}
112
- {{- errorf "%s. See %s" . $contentPath }}
112
+ {{- errorf "%s. See %s" .Err $contentPath }}
113
113
  {{- end }}
114
- {{- else }}
114
+ {{- else with .Value }}
115
115
  {{- /* Destination is a remote resource. */}}
116
116
  {{- $r = . }}
117
117
  {{- end }}
@@ -165,8 +165,8 @@ partial template, after the render hook has captured the resource.
165
165
  fetchpriority="{{ site.Params.thulite_images.defaults.fetchpriority }}"
166
166
  loading="{{ site.Params.thulite_images.defaults.loading }}"
167
167
  alt="{{ .PlainText }}"
168
- {{- with .Title -}}title="{{ . }}"{{- end -}}
168
+ {{- with .Title -}}title="{{ . }}"{{- end }}
169
169
  id="{{ $id }}"
170
- />
170
+ >
171
171
 
172
172
  {{- /**/ -}}
@@ -59,7 +59,7 @@ Add this CSS to your site to remove small gaps between adjacent elements:
59
59
 
60
60
  @context {page} [page] The current page.
61
61
  @context {string} [src] The path to the base image: a page resource, a global resource, or a remote resource.
62
- @contect {int} [width] The display width of the image, in pixels, falling back to 100% of the viewport width.
62
+ @context {int} [width] The display width of the image, in pixels, falling back to 100% of the viewport width.
63
63
  @context {string} [sizes] = "" # "100vw", "75vw", or "auto" for example
64
64
  @context {string slice} [formats] A slice of image formats, ordered by precedence, to use when creating images for the srcset attribute of each source element.
65
65
  @context {string} [process] = "" # "fill 1600x900" for example
@@ -192,7 +192,7 @@ Add this CSS to your site to remove small gaps between adjacent elements:
192
192
  {{- end }}
193
193
  {{- end }}
194
194
  {{- else }}
195
- {{- /* The width was not speficied, will be using $stdWidths. */}}
195
+ {{- /* The width was not specified, will be using $stdWidths. */}}
196
196
  {{- $stdWidths = $stdWidths | append $r.Width | sort }}
197
197
  {{- range $stdWidths }}
198
198
  {{- /* Do not enlarge. */}}
@@ -257,10 +257,10 @@ Add this CSS to your site to remove small gaps between adjacent elements:
257
257
  {{- /* Get image resource. */}}
258
258
  {{- $r := "" }}
259
259
  {{- if $u.IsAbs }}
260
- {{- with resources.GetRemote $u.String }}
260
+ {{- with try (resources.GetRemote $u.String) }}
261
261
  {{- with .Err }}
262
- {{- errorf "%s. See %s" . $.contentPath }}
263
- {{- else }}
262
+ {{- errorf "%s. See %s" .Err $.contentPath }}
263
+ {{- else with .Value }}
264
264
  {{- /* Destination is a remote resource. */}}
265
265
  {{- $r = . }}
266
266
  {{- end }}
@@ -59,7 +59,7 @@ Add this CSS to your site to remove small gaps between adjacent elements:
59
59
 
60
60
  @context {page} [page] The current page.
61
61
  @context {string} [src] The path to the base image: a page resource, a global resource, or a remote resource.
62
- @contect {int} [width] The display width of the image, in pixels, falling back to 100% of the viewport width.
62
+ @context {int} [width] The display width of the image, in pixels, falling back to 100% of the viewport width.
63
63
  @context {string} [sizes] = "" # "100vw", "75vw", or "auto" for example
64
64
  @context {string slice} [formats] A slice of image formats, ordered by precedence, to use when creating images for the srcset attribute of each source element.
65
65
  @context {string} [process] = "" # "fill 1600x900" for example
@@ -189,7 +189,7 @@ Add this CSS to your site to remove small gaps between adjacent elements:
189
189
  {{- end }}
190
190
  {{- end }}
191
191
  {{- else }}
192
- {{- /* The width was not speficied, will be using $stdWidths. */}}
192
+ {{- /* The width was not specified, will be using $stdWidths. */}}
193
193
  {{- $stdWidths = $stdWidths | append $r.Width | sort }}
194
194
  {{- range $stdWidths }}
195
195
  {{- /* Do not enlarge. */}}
@@ -251,12 +251,12 @@ Add this CSS to your site to remove small gaps between adjacent elements:
251
251
  {{- /* Get image resource. */}}
252
252
  {{- $r := "" }}
253
253
  {{- if $u.IsAbs }}
254
- {{- with resources.GetRemote $u.String }}
254
+ {{- with try (resources.GetRemote $u.String) }}
255
255
  {{- with .Err }}
256
- {{- errorf "%s. See %s" . $.contentPath }}
257
- {{- else }}
256
+ {{- errorf "%s. See %s" .Err $.contentPath }}
257
+ {{- else with .Value }}
258
258
  {{- /* Destination is a remote resource. */}}
259
- {{- $r = . }}
259
+ {{- $r = .Value }}
260
260
  {{- end }}
261
261
  {{- else }}
262
262
  {{- errorf $msg }}
@@ -253,10 +253,10 @@ Add this CSS to your site to remove small gaps between adjacent elements:
253
253
  {{- /* Get image resource. */}}
254
254
  {{- $r := "" }}
255
255
  {{- if $u.IsAbs }}
256
- {{- with resources.GetRemote $u.String }}
256
+ {{- with try (resources.GetRemote $u.String) }}
257
257
  {{- with .Err }}
258
- {{- errorf "%s. See %s" . $.contentPath }}
259
- {{- else }}
258
+ {{- errorf "%s. See %s" .Err $.contentPath }}
259
+ {{- else with .Value }}
260
260
  {{- /* Destination is a remote resource. */}}
261
261
  {{- $r = . }}
262
262
  {{- end }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thulite/images",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "Thulite images",
5
5
  "author": "Thulite",
6
6
  "license": "MIT",
File without changes
File without changes