HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

404 Page not found on talk links #1890

Closed jjwalton closed 4 years ago

jjwalton commented 4 years ago

Apologies if I'm posting this to the wrong place (the recommended page when I began this bug report took me to a forum that is apparently no longer used, so please direct me to the right place for help on this issue).

On my academic webpage I'm getting a 404 page not found error when I try to navigate to any of my talks (so as to bring up title and abstract information etc.). This doesn't happen when I run hugo server and try the pages in localhost: 1313.

rodrigoalcarazdelaosa commented 4 years ago

Repost this here please. That's the right (new) place for getting support.

rodrigoalcarazdelaosa commented 4 years ago

@gcushen the links in the bug report template should probably be updated 😉

jjwalton commented 4 years ago

Repost this here please. That's the right (new) place for getting support.

Thanks for the redirect, I had assumed the post wasn't suitable here (although I think what I'm experiencing is probably a bug rather than a user error). Many thanks.

rodrigoalcarazdelaosa commented 4 years ago

Have you set your baseurl in your config? Also make sure you're using the same Hugo version locally and in Netlify (or where you deploy)

jjwalton commented 4 years ago

Have you set your baseurl in your config? Also make sure you're using the same Hugo version locally and in Netlify (or where you deploy)

These are great suggestions, thank you. I do have the baseurl set in my ./config/config.toml (if I didn't, wouldn't the rest of the site not work properly? I remember often having issues with understanding how I use the baseurl in the past though). Currently I have baseurl = "jjwalton.github.io"(webpage in question is here).

I'm hosting through github . I'm a minimal user and currently don't know the systems (including git) in enough depth than to do much above just following the basic setup tutorials (I followed the instructions on this page as I remember). I thought that the script I used ran Hugo, then uploaded the static site to github, so presumably there can be no version issue here?

Also, I posted in the other forum as you suggested above, so I'm happy to continue the conversation over there. Thanks again for your help!

jjwalton commented 4 years ago

Sorry, I really should have spotted this earlier, but there's something really funny going on with the way urls are being generated, so this is the issue.

I have my webpage at this link: https://jjwalton.github.io/. But then if I click the icon on the top-left of the page to return home, it takes me to https://jjwalton.github.io/jjwalton.github.io/ (which still works!).

It's from the latter page that the links don't work. From the first, it does, but then I can follow from links there urls such as https://jjwalton.github.io/jjwalton.github.io/publication/2020kw_a/.

So it seems I have something like the baseurl or similar settings messed up. Now I think about it, I was messing with these settings a while back when I was trying to upload my site to a university server instead. I couldn't get it to work, and looking at forums online I was messing around with things like relativeURLs or canonify URLs until it worked. So this must be a totally self-inflicted issue (albeit one I'm not sure how to fix now!).

[Edit: So I just removed the baseurls and made them just "" and it's now working fine! Serves me right for not spending enough time to learn how these things work I suppose. But now I wonder why it is working, because the guides said to change the baseurl to <USERNAME>.github.io. Maybe I've bodged together a solution that only works because of a previous mistake, but for the future I should do it properly. Let me know if you have suggestions).

gcushen commented 4 years ago

Closing as this doesn't appear to be a bug and I see this moved to the Discussion forum: https://github.com/wowchemy/wowchemy-hugo-modules/discussions/1893