@nera-static/plugin-images 1.0.1 → 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,18 @@ 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
+
14
+ ## [1.0.2] - 2026-10-11
15
+
16
+ ### Changed
17
+
18
+ - README shows the Test workflow and npm version badges under the title, like every other Nera package.
19
+
8
20
  ## [1.0.1] - 2026-10-09
9
21
 
10
22
  ### Fixed
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @nera-static/plugin-images
2
2
 
3
+ [![Test](https://github.com/seebaermichi/nera-plugin-images/actions/workflows/test.yml/badge.svg)](https://github.com/seebaermichi/nera-plugin-images/actions/workflows/test.yml)
4
+ [![npm version](https://img.shields.io/npm/v/@nera-static/plugin-images)](https://www.npmjs.com/package/@nera-static/plugin-images)
5
+
3
6
  A plugin for the [Nera](https://github.com/seebaermichi/nera) static site generator that turns every local image in your Markdown into responsive, modern-format markup at build time: `<picture>` with AVIF/WebP, `srcset`/`sizes`, `width`/`height`, lazy loading, and camera metadata (EXIF/GPS) stripped.
4
7
 
5
8
  📖 **Documentation:** [nera.js.org](https://nera.js.org)
@@ -218,17 +221,19 @@ A folder that holds only Markdown photos is the safe case. On the field-test sit
218
221
 
219
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`).
220
223
 
221
- 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:
222
225
 
223
226
  ```yaml
224
227
  # GitHub Actions, before `npm run build`
225
228
  - uses: actions/cache@v6
226
229
  with:
227
230
  path: .nera-cache
228
- key: nera-images-${{ hashFiles('assets/**', 'theme/assets/**', 'config/images.yaml') }}
229
- restore-keys: nera-images-
231
+ key: nera-cache-${{ hashFiles('assets/**', 'theme/assets/**', 'pages/**', 'config/images.yaml', 'package-lock.json') }}
232
+ restore-keys: nera-cache-
230
233
  ```
231
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
+
232
237
  ```yaml
233
238
  # GitLab CI, in the build job
234
239
  cache:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nera-static/plugin-images",
3
- "version": "1.0.1",
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"