Hacker News new | ask | show | jobs
by hanniabu 1600 days ago
I haven't been able to figure it how to implement my Jekyll use case in Hugo, maybe you or someone else would be able to help me.

I don't want to use a theme at all because I don't really use it for making posts, but just a website with different pages. I have a page template that pulls in my head, nav, page content, and footer.

You can see an example here: https://github.com/etheralpha/clientdiversity-org/blob/main/...

Pretty basic stuff but when I checked out Hugo I was having the hardest time trying to figure out how to do it.

2 comments

Yeah, Jekyll and Hugo treat pages differently. It does depend on what your intended URL format is going to be when building out your layouts. I’m on mobile so I can’t get into detail now how they differ, but you can’t drop Jekyll templates into Hugo and get them to work like that. I would actually download and study some free Hugo templates to learn by example how they treat pages. This tripped me up when I switched too, but for me it was worth it to move away from Jekyll.

[edit] I just want to add - pay attention to the content “type” in relation to creating a template and specifying the type in the frontmatter. https://gohugo.io/content-management/organization/#type may point you in the right direction. You can manifest your own type by creating a template in the correct layouts dir and then specifying that type in your frontmatter.

Do not use Hugo for this kind of setup. It's horrendously complicated and it was probably never meant to be used like this. Hugo might be good for a blog, but even a simple personal static site where you want to have different templates for each page is only achievable by jumping so many hoops.
This is my use-case (very simple, fully static site- not blog), and I'd love a tool to generate it from markdown. Do you happen to have a recommendation of a simpler tool for that?
I worked with middleman[0] before and it was much easier to setup for these kind of sites. It might not be as fast as Hugo but who cares if you change a page every other month.

[0] https://middlemanapp.com/