You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cook build web: search-index.js changes on every build of an unchanged collection #806
cook build web doesn't write the same site twice for the same collection: static/search-index.js comes out with its entries in a different order on every run. So a static site published through git, rsync or a CI deploy always has a change to ship, even when nothing changed.
To reproduce: build the seed twice into two folders and compare them.
cook build web --base-path seed /tmp/a
cook build web --base-path seed /tmp/b
diff -rq /tmp/a /tmp/b
Only static/search-index.js differs: same entries, different order. Everything else is stable, including --sitemap and --feed output.
The index is built by walking the recipe tree (src/build/index.rs), whose children are a HashMap, so the order depends on the hash seed of each run. The sitemap (src/build/sitemap.rs) already sorts its entries by path for this reason. This has been there since the static-site generator came in, in f6703df (#344).
Activity