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

Site default to /posts/ #176

Open
t3kg33k opened this issue Apr 4, 2024 · 5 comments
Open

Site default to /posts/ #176

t3kg33k opened this issue Apr 4, 2024 · 5 comments

Comments

@t3kg33k
Copy link

t3kg33k commented Apr 4, 2024

Is it possible change the default so that visitors are presented/sent to the /posts/ first for view of the table of contents of posts?

Nice job on the theme, by the way.

@ctmbl
Copy link
Contributor

ctmbl commented Apr 10, 2024

hey to my understanding because HUGO is a static website builder the main page actually is (and will always be) index.html (located in layouts/) as described in the doc.

However I guess that you could change the code of this layoust/index.html to automatically redirect to /posts I don't know how to do such thing in HUGO but maybe that would be your way to go 👍
Hope I could help 🙁

@t3kg33k
Copy link
Author

t3kg33k commented Apr 10, 2024

Thanks for the response. I'm not a web developer so I am a bit clueless on such things. Maybe if I can eventually figure it out from trial and error.

@ctmbl
Copy link
Contributor

ctmbl commented Apr 11, 2024

I've dig a bit because it's a subject that might interest me in the future so here is what I've found:

  1. you could use HUGO's aliases mechanism, though I don't know if assigning / (the homepage) as an alias for /posts will work, you could try
  2. I discovered that HTML meta tags could be use to perform redirects:
    https://discourse.gohugo.io/t/url-redirect-forwarding/4689/4
    https://www.w3schools.com/tags/att_meta_http_equiv.asp

Let me know if you try and one of these work 🙂

@t3kg33k
Copy link
Author

t3kg33k commented Apr 11, 2024

Thanks for the heads up.
The more I think about it, is my idea even a good idea if I want more SEO? Or, would an alias fix that problem?

@ctmbl
Copy link
Contributor

ctmbl commented Apr 12, 2024

The more I think about it, is my idea even a good idea if I want more SEO? Or, would an alias fix that problem?

I'm not sure honestly, an alias may be best yes (if it works) but depending on the size and popularity of your website is SEO relevant? I honestly don't know

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

2 participants