digitalcraftsman / hugo-agency-theme

Port of Startbootstrap's Agency theme to Hugo
http://themes.gohugo.io/theme/agency/
Apache License 2.0
160 stars 137 forks source link

External url with hashbang /#/ or /#!/ won't open #110

Closed Karadox closed 5 years ago

Karadox commented 6 years ago

The code to allow for smooth scrolling doesn't take into account urls with hashbangs.

To reproduce enter the following url in a link and click on it. http://example.com/base/index.html/#!/a

Just the check if there is a hash is not enough. I've added comparing against host on line 4 of agency.js (Not the best fix, i know, but works for external links) if (this.hash && window.location.pathname == "/" && window.location.host == this.host) {

greetz

stp-ip commented 5 years ago

Closing for now. If this is still a bug, let us know.