Re:State of the Web: Static Site Generators
by chrsstrm on Monday January 31, 2022 @01:01AM
(#30145085)
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.
Re:State of the Web: Static Site Generators
by mgraupner on Monday January 31, 2022 @02:24AM
(#30145432)
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.
Re:State of the Web: Static Site Generators
by Ruthalas on Monday January 31, 2022 @12:12PM
(#30150508)
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 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.