chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
582 stars 267 forks source link

Uncaught ReferenceError: pageHasLoaded is not defined #250

Closed blentle closed 2 years ago

blentle commented 2 years ago

I have checked all the prerequisites below and I'm yet experiencing a problem

Describe the bug

I got 'Uncaught ReferenceError: pageHasLoaded is not defined' when I click the menu 'links' after I pull the latest submodule in my site, debug it , I found some variables have been moved to a assets/js/variables.js .

Avoid long-winded descriptions

  • OS: [macos ]
  • Browser [e.g. chrome 76, safari 13]

how could I solve this problem for my earlier blog posts.

many thanks.

onweru commented 2 years ago

@blentle, I couldn't reproduce this. Can you confirm if you're still experiencing it across browsers? If yes, please attach a recording of the same here. Thanks in advance.

blentle commented 2 years ago

While starting the server (by command hugo server) after I pulled the latest submodule(hugo-clarity) for my blog. It occured like below WechatIMG396

links options doesn't work like errors by F12 console. debugged it , I found 2 variables have been moved from ${myblog-path}/themes/hugo-clarity/assets/js/index.js to variables.js (added in new version ). I copied them ,put it at the top of index.js ,it worked like : WechatIMG397

onweru commented 2 years ago

Something specific to your instance is off. I really would like to try your repo. Something else is causing the bug. Moving the variables, isn't exactly it, since I have seen it work elsewhere flawlessly.

blentle commented 2 years ago

Resolved ! I moved the hugo-clarity/layouts to myblog/layouts, which caused bug. because I modified the comments.html by using remark42. finally I removed the layouts directory of my root blog, It worked. Thank you for your time.