Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken links #61

Open
wntiv-main opened this issue Apr 26, 2023 · 0 comments
Open

Broken links #61

wntiv-main opened this issue Apr 26, 2023 · 0 comments

Comments

@wntiv-main
Copy link

wntiv-main commented Apr 26, 2023

Currently I have only seen this affect the "View the Changelog" button on the list pages (https://github.com/finnito/Science/blob/master/themes/hugo-spartan/layouts/_default/list.html). I am unsure how exactly it is caused and whether it is an issue with the spartan style or with how it is integrating with the page, or possibly a bug or nuance in hugo itself, but the href property of the link ends up being set to an incorrect value (https:/github.com/finnito/Science/commits/master/content/12phy/as91173 as opposed to https://github.com/finnito/Science/commits/master/content/12phy/as91173, note single slash after https:). Reading through the source, at first i thought this may be some small nuance of the path.Join function or something like that, however by cloning and building this on my machine it seems to work. Not entirely sure but if I had to guess I think that either maybe the site is on an older build of the source (unlikely, I assume you have some kind of automation behind this), or maybe that path.Join was modified in newer versions of hugo and your hugo isn't up to date? It could also just be a bug in spartan or hugo, or just a difference in the way hugo builds on different platforms (the hugo documentation does specify a slightly different parsing system for windows to replace backslashes with forward slashes, it seems unlikely but maybe a bug in that causes a parser differential in this case of a https://).

Reproduce:

  • Navigate to https://putaiao.nz/12phy/as91173/ (may affect other pages, I have only tested this one)
  • Click on the "View the Changelog" button
  • Note redirection to 404 page + URL is malformed due to single slash after https: causing browser to treat as a relative URL

From Here:

  • I would recommend rebuilding, if that doesn't work try testing building on a windows system if possible (seemed to work for me)
  • You could also maybe try updating your hugo installation if that doesn't work
  • If it seems to be caused by a bug in spartan or hugo maybe send an issue to them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant