gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
357 stars 139 forks source link

Fix JS error when ShowBackToTopButton is false #211

Closed realansgar closed 8 months ago

realansgar commented 9 months ago

When ShowBackToTopButton is false, the button itself is removed. But the script implementing the button is still running and throwing an error, because it cannot find the expected button element.

This PR removes the script as well as the button, if the setting is turned off

netlify[bot] commented 9 months ago

Deploy Preview for gokarna-hugo ready!

Name Link
Latest commit 63ddaf931e3549144a6d3213a80bc54d21e8f3f3
Latest deploy log https://app.netlify.com/sites/gokarna-hugo/deploys/65a6a65887cd75000869e7d0
Deploy Preview https://deploy-preview-211--gokarna-hugo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.