panr / hugo-theme-hello-friend

Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing!
https://github.com/panr/hugo-theme-hello-friend/
MIT License
1.06k stars 1.24k forks source link

Can't get posts to show #91

Closed wmhunter96 closed 5 years ago

wmhunter96 commented 5 years ago

Hey, I'm new to hugo and love your theme but i've tried to follow examples and can't seem to get my posts to show

https://github.com/wmhunter96/hunterrodriguez

thomasjsn commented 5 years ago

The minimum Hugo version for this theme is 0.57, is your Hugo version up to date?

gkaramanis commented 5 years ago

Same here. I can't see the posts on the home page, they show fine on archive. I have Hugo 0.58.3 both on my machine and on Netlify.

https://karamanis.netlify.com https://github.com/gkaramanis/karaman.is

Love the theme, by the way!

panr commented 5 years ago

@gkaramanis the theme's looking for content/post dir by default (you can change it in config.toml). I see that you have many other catalogs in content and none of those match default settings.

gkaramanis commented 5 years ago

I was trying different directories, must have missed it when I pushed to GitHub, sorry about that.

I've changed it back to posts but I can't see any posts. And it seems that they stopped showing on archives, too πŸ€”

panr commented 5 years ago

@gkaramanis OK, I cloned your repo (do you know it weights ~3GB? 😱) and based on your folder structure inside content, I changed contentTypeName = "posts" to post (it's because you manualny set type of each post, so you can name this folder whatever you want until you have this type: post inside your front matter. I didn't get that at first glance.).

Also you have your own index.html layout, so all your posts (files with type: post) are on route /posts (name of your folder).

I hope this helps you ;-)

gkaramanis commented 5 years ago

Yes, I knew about the size, that’s the result of having a photography site for 7+ years πŸ™ƒ The structure was probably a little messy since it was a migration from Squarespace.

Big thanks for the help, I think I understood what the problem is! πŸ™

panr commented 5 years ago

Fingers crossed then 🀞

gkaramanis commented 5 years ago

Just to confirm that index.html inside the layouts folder (from the previous theme) was the culprit. Thanks again!

panr commented 5 years ago

Glad to here it! I'm closing the issue 😎