News for hackers. Stuff that matters.
Re:Astro 1.0 – a web framework for building fast, content-fo... by skrtskrt on Tuesday August 09, 2022 @03:44PM (#32403190)
The hardest part of Hugo for me was creating my theme from scratch (docs are eh on this but I found some good 3rd party tutorials) but after that it's been an absolute breeze.

After spending a little time understanding Go templating it is really beautiful

Re:Astro 1.0 – a web framework for building fast, content-fo... by powersnail on Tuesday August 09, 2022 @04:05PM (#32403486)
Half way through customizing a Hugo theme, I suddenly realized that I don't need a theme at all. Hugo can be used themelessly, where you just write templates specifically for your site. Everything was so much easier from there.
Re:Astro 1.0 – a web framework for building fast, content-fo... by procombo on Tuesday August 09, 2022 @04:32PM (#32403870)
That was my experience too. There is/was no formal standard for creating themes, just an empty dir (which they consider a feature). Even if they had one or two "official themes" that would have helped tremendously.

Instead we spent a week researching how popular 3rd party themes did things, and made a hybrid. Then we moved away completely. I really wanted it to work for us and we were so close. Hugo is so fast and is brilliant on a couple of things.... but barely missed.

I can't remember exactly but with what we were doing we were going to be heavily dependant on their Scratchpad, which felt like a hack. It's all just hacks, and they like it. Lack of solid conventions, and they LOVE it.

Re:Astro 1.0 – a web framework for building fast, content-fo... by skrtskrt on Tuesday August 09, 2022 @04:35PM (#32403906)
wait do you have a repo example of this or some sort of link?

My theme is so simple I think redoing it as themeless may be better

Re:Astro 1.0 – a web framework for building fast, content-fo... by powersnail on Tuesday August 09, 2022 @04:56PM (#32404181)
Replace the themes directory with the "layouts" directory which contains all the templates. I do my blog this way. https://github.com/PowerSnail/PowerSnail.github.io
Re:Astro 1.0 – a web framework for building fast, content-fo... by skrtskrt on Tuesday August 09, 2022 @05:06PM (#32404299)
OK I see, but even though it's themeless you still have to follow the Hugo theming structure (_default, partials, index.html, etc). Mine is the same as that, it's just nested into the themes directory.

It's that theming structure that was a pain to figure out the first time for me

Re:Astro 1.0 – a web framework for building fast, content-fo... by powersnail on Tuesday August 09, 2022 @05:20PM (#32404493)
Yeah, that template look-up hierarchy is unavoidable. The benefit of being themeless is mostly organizational: one config file, one asset directory, etc.
Re:Astro 1.0 – a web framework for building fast, content-fo... by salmo on Tuesday August 09, 2022 @07:24PM (#32405961)
Totally agree on this. Took me a bit to wrap my head around it vs other templating I’ve used.

Also figuring out the variable structure took me a bit, but now the docs make sense to me.

My theme is super simple. A few templates, 1 CSS file, and a tiny amount of vanilla JS. I just let Hugo + CSS do most of the lifting.

I think some folks have had bad experiences with themes that layer a JS framework on Hugo, though. That may be a better case for a completely JS ecosystem.

There’s a lot of good options. That’s a good problem to have. Just use what you like, I guess.