hugo-PaperMod
hugo-PaperMod copied to clipboard
Content with Cover Images generate Cumulative Layout Shift
Dear Adithya, kindly check on this. Posts without any Cover Image ( Ex: https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/) show ZERO CLS score (which is perfect!), But as soon as an Image is added (as cover image), either TOC creates a shift, or when TOC is false, post-content creates a shift or sometimes both. The CLS score is >0.2 which hurts site metrics. Please throw some light. By the way, thanks for this Wonderful Theme!
Can you help me why fix this? Pls investigate why this is happening.
Can you help me why fix this? Pls investigate why this is happening.
@adityatelange ,it's happening because we're not defining image size on attribute. it might helpful https://gtmetrix.com/cumulative-layout-shift.html
Can you help me why fix this? Pls investigate why this is happening.
@adityatelange ,it's happening because we're not defining image size on attribute. it might helpful https://gtmetrix.com/cumulative-layout-shift.html
We are when using page bundles. https://github.com/adityatelange/hugo-PaperMod/blob/045c08496d61b1b3f9c79e69e7d3d243a526d8f3/layouts/partials/cover.html#L27
there's no wat to calc it if you're statically linking it instead of using page bundles.