[Absolute Beginner, Gotta Start Somewhere] Wrong Links Referenced when Navigating Website

I saw the post that I should come into this forum with a little background knowledge in this area, but the fact is I will only learn by practicing. I hope you all are okay with this post.

I am currently following a tutorial by Luke Smith on getting started with Hugo. I went and downloaded a version of Hugo that worked for me and I ensured Git was installed on my PC. I am currently confused on what I am doing wrong, as my public folder is showing the *.html versions of the markdown files I created, but the website is unable to actually reference them.

The html is in this location:

file:///C:/Users/Owner/Desktop/TreySmith/public/index.html

For example, the link that “takes“ me to one of my markdown pages I made, “about,“ has this link on the public website html:

file:///C:/personal/

When the link should be:

file:///C:/Users/Owner/Desktop/TreySmith/public/about/index.html

For some reason the wrong link is being used.

The fact is I assume there is something I am fundamentally doing wrong that is causing this, that is probably a beginner mistake. How might I fix the weird links?

Any chance you could let us see your code?

Um, I believe this is what you want?

If you run hugo server and then go to the URL running the test environment (normally https://localhost:1313 the links from the homepage work.

The problem with the files generated in the public folder is because you haven’t set the correct baseURL in hugo.toml. You’ll need to set that to the correct URL when you’re ready to make your site live, but I reckon for now you should work with the built-in development server and get your site doing what you want.

1 Like

I will put this in my notes. Thank you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.