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

Home button (icon looks like house) is not working properly. #36

Closed
Rayjun0525 opened this issue May 5, 2023 · 10 comments
Closed

Home button (icon looks like house) is not working properly. #36

Rayjun0525 opened this issue May 5, 2023 · 10 comments

Comments

@Rayjun0525
Copy link
Contributor

Hello :)
There is a problem of going to the top of the git page when you press the home button. I wonder if this is my git page setting problem or if it can be solved by setting it in the config.toml file.

@hugo-sid
Copy link
Owner

hugo-sid commented May 5, 2023

Hello :)

There is a problem of going to the top of the git page when you press the home button. I wonder if this is my git page setting problem or if it can be solved by setting it in the config.toml file.

Could you please explain what you meant by 'git page' ?

@Rayjun0525
Copy link
Contributor Author

Rayjun0525 commented May 5, 2023

I am writing a hugoblog through the page of GitHub.
My url is like this
https://gitId.github.io/blogTitle/

However, clicking the Home button on the main page will switch to page 404 of github.
The same problem occurs when you click 'See all posts' on the main page that is set to go to /posts/.

I resolved by changing the link address of the third line of the file "hugo-blog-awesome/layouts/partials/header.html" and the link address of the 20th line of the file "hugo-blog-awesome/layouts/index.html"

But to avoid this problem, can't we change it so that we can specify the initial home path as a variable? I am not familiar with the correction of hugo yet, so I inquired about the issue instead of a commit request.

@hugo-sid
Copy link
Owner

hugo-sid commented May 5, 2023

Thanks for reporting this issue @Rayjun0525 . It has been fixed now.

can't we change it so that we can specify the initial home path as a variable

Yes, we can do that.

Can you update your theme and then set the baseURL in config.toml file to your blog/website URL?

@Rayjun0525
Copy link
Contributor Author

It's Fantastic. Thank you for the quick action!

@hugo-sid
Copy link
Owner

hugo-sid commented May 5, 2023

You are welcome @Rayjun0525.

Happy blogging :)

@kusyka911
Copy link
Contributor

kusyka911 commented May 5, 2023

set the baseURL in config.toml

@hugo-sid @Rayjun0525

I want to mention that there is ability to set baseURL variable in build command (hugo -b /kusyka/). Setting baseURL in config file may break site running on dev server (hugo server command). See CLI docs for more options.

@hugo-sid
Copy link
Owner

hugo-sid commented May 5, 2023

Setting baseURL in config file may break site ruining on dev server

@kusyka911, my experience has been quite the opposite of what you mentioned.

I have worked with a ton of Hugo websites but I never experienced this issue. If this issue arises only when we use no-root baseURL, then I have nothing to say. I have not used a non-root baseURL yet.

@young-hnau
Copy link

Hello, I am having a similar issue where the Home Icon Button is redirecting me to "localhost:1313".

I have double checked that my config file has baseURL set to my blog's domain. Is there something else I should check as well?

@hugo-sid
Copy link
Owner

hugo-sid commented Sep 15, 2023

Hello, I am having a similar issue where the Home Icon Button is redirecting me to "localhost:1313".

I have double checked that my config file has baseURL set to my blog's domain. Is there something else I should check as well?

Hi @Ritter99.

  • What command are you using to deploy or build your site?
  • What exactly is your baseURL ?

@young-hnau
Copy link

@hugo-sid, I am using the "server" command to run Hugo and my baseURL = "https://blog.example.com/"

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

4 participants