I’ve been using the Hugo ‘official’ documentation theme for a while now. The menus on the left open fine when I run hugo server -D locally and when I uploaded them to github/netlify. But just yesterday, when I generated the files using the Hugo command and uploaded the generated files to github, none of the menus on the left open up. I’ve tried this on Netlify too. The files are generated fine and the site works but the menus on the left just refuse to open up. Anyone here care to share on what I might be doing wrong here.
Link to my test site btw: https://writarium.github.io/
After uploading to github/netlify - Expando stops working
Link to my test site (again):https://writarium.github.io/
Notice that none of the menus are expanding or collapsing. When you click the menus on the header, the links work fine and the parent menu expands.
Javascript I’m told is a client browser issue and not a server one. But I don’t think that’s the case here. It was working just fine, like 8 hours ago when I last generated the site using the Hugo command and uploaded them to github. Now they just refuse to open up.
You’re thinking in the right direction with your last paragraph about Javascript.
I opened up the Web Console in firefox on your site and got this error.
I’d be looking at whether the assets are being updated correctly when you deploy to netlify or gitlab. Running hugo with the --gc switch might help. And on Netlify, make sure that you aren’t using their tools to minify or modify your JS assets in any way, because that breaks the checksum (I don’t know if GitHub Pages does anything like that).
@funkydan2, sorry to disturb you again. But it seems the assets folder isn’t being created at all when I run hugo --gc (or hugo for that matter).
There does exist an assets folder which has js and css files in the source folder. Any idea on where do I place this in the generated site’s folder? The root folder?
Ok. So I directly uploaded the generated files directly to github manually and WOW! the site is working fine.
@funkydan2 (or anyone), any idea what the reason might be? I’m using the following git command (sorry going off topic and moving to git Qs but asking in case someone might have an answer. I’ve tried git add * too but no luck.