I am trying to make my blog page the actual landing page for my site. I found the perfect Hugo theme for my liking. However, I am struggling to get the blog link to be the actual landing page link, the proper way.
I want to try to do things the correct way so that I can always revert back if needed. I believe I have to edit my index.html page but I have struggled to figure it all out.
For example, I have
<!--- ADD HOME SECTION ---------------->
{{- partial "sections/home.html" . -}}
on this index page. The index page is under my themes/theme-name directory. I don’t want the “sections/home.html” at all, I simply want my blog page. The problem is, my blog page itself isn’t part of the partial section, I think. I’m going to paste my current code here: https://github.com/mtgingrass/test.github.io.git
Perhaps someone can direct me in the right direction.
When you say to copy the contents of the “blog list template file,” what file are you referring to? I think that’s part of the issue, I don’t know which file is serving up the blog page.
There are just 3 layouts in the theme. baseof.html, list.html and single.html out of which only list.html is the one that can render the list of posts. So that must be it.
Create a file called layouts/index.html and in that, copy the contents from your theme’s layouts/_default/list.html. With some additional changes, it might work. Finally, in your content/posts folder, you can add an _index.md file with the frontmatter:
---
_build:
render: false
---
So that Hugo won’t generate a page at the /posts/ path
This suggestion got me very close. Thank you for the reply. It definitely made the blog page be the landing page. However, I would like this to be the default page: Posts
Basically, I want to avoid having to click on “posts” as well. I’ll play around with it and see if I can make that happen.
I really appreciate your help on this. Locally, when I use that index.html page, The image looks like this, by default. Not quite what I am looking for.