mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-10-10 22:09:31 +00:00
* Add reading progress bar for articles * Let page-level showReadingProgress override the site setting Hugo's default treats false as empty, so a page-level false could not disable the bar once it was enabled site-wide. Resolve the value by initialising from the site setting and overriding it only when the front matter parameter is actually present, and use the same resolved boolean in single.html and head.html. * Guard the reading progress handler and mark the listener passive The script loads in the head without defer, so the scroll listener is registered before the progress bar element exists. A scroll event fired during parsing, such as when the browser restores the scroll position on reload, would throw. Bail out when the element is missing, matching the guard in background-blur.js, and mark the scroll listener passive as toc.html already does.