@nera-static/plugin-images 1.0.2 → 1.0.3

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
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.3] - 2026-11-18
9
+
10
+ ### Changed
11
+
12
+ - README "Cache and CI": the GitHub Actions snippet's cache key also covers `pages/**` and `package-lock.json`, so variants that pages or an npm theme ask for are saved too, and the section says that the deploy workflow of `nera publish` (`@nera-static/nera` 1.22.0) already caches `.nera-cache`.
13
+
8
14
  ## [1.0.2] - 2026-10-11
9
15
 
10
16
  ### Changed
package/README.md CHANGED
@@ -221,17 +221,19 @@ A folder that holds only Markdown photos is the safe case. On the field-test sit
221
221
 
222
222
  Variants live in `.nera-cache/images/` (`cache_dir`): `files/` holds the images, `manifest.json` what they were made from. A variant is encoded only when its file is missing, and file names carry a hash of the source and the settings, so URLs are stable across builds and safe to cache forever. Variants no build uses any more are pruned (`prune: true`).
223
223
 
224
- A cold build of a site with ~100 images takes a minute or more, because AVIF encoding is slow; a warm build adds well under a second. Keep the cache between CI runs:
224
+ A cold build of a site with ~100 images takes a minute or more, because AVIF encoding is slow; a warm build adds well under a second. Keep the cache between CI runs. The deploy workflow `nera publish` generates (`@nera-static/nera` ≥ 1.22.0) already does; elsewhere, add:
225
225
 
226
226
  ```yaml
227
227
  # GitHub Actions, before `npm run build`
228
228
  - uses: actions/cache@v6
229
229
  with:
230
230
  path: .nera-cache
231
- key: nera-images-${{ hashFiles('assets/**', 'theme/assets/**', 'config/images.yaml') }}
232
- restore-keys: nera-images-
231
+ key: nera-cache-${{ hashFiles('assets/**', 'theme/assets/**', 'pages/**', 'config/images.yaml', 'package-lock.json') }}
232
+ restore-keys: nera-cache-
233
233
  ```
234
234
 
235
+ The key covers `pages/**` because pages ask for variants (query parameters, frontmatter images), and `package-lock.json` because a theme from npm brings its own images. `actions/cache` saves nothing when the key matches exactly, so a key that misses one of these leaves new variants unsaved, and every build encodes them again.
236
+
235
237
  ```yaml
236
238
  # GitLab CI, in the build job
237
239
  cache:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nera-static/plugin-images",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A plugin for Nera static site generator to generate responsive, modern-format images (AVIF/WebP, srcset, width/height, lazy loading) at build time.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,7 +14,7 @@
14
14
  ".": "./index.js"
15
15
  },
16
16
  "bin": {
17
- "nera-images": "./bin/publish-template.js"
17
+ "nera-images": "bin/publish-template.js"
18
18
  },
19
19
  "files": [
20
20
  "bin",
@@ -38,7 +38,7 @@
38
38
  "license": "MIT",
39
39
  "repository": {
40
40
  "type": "git",
41
- "url": "https://github.com/seebaermichi/nera-plugin-images"
41
+ "url": "git+https://github.com/seebaermichi/nera-plugin-images.git"
42
42
  },
43
43
  "bugs": {
44
44
  "url": "https://github.com/seebaermichi/nera-plugin-images/issues"