From 41420c0e32cba69d4f4e19175bd3350fed427275 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Sun, 20 Nov 2022 11:36:46 +0100 Subject: Publish "Website adventures" part 2 about HTML and CSS --- .../2022/website-adventures-generators/index.md | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'source/blog/2022/website-adventures-generators') diff --git a/source/blog/2022/website-adventures-generators/index.md b/source/blog/2022/website-adventures-generators/index.md index 0aba183..7e52f17 100644 --- a/source/blog/2022/website-adventures-generators/index.md +++ b/source/blog/2022/website-adventures-generators/index.md @@ -5,11 +5,14 @@ layout: "blog" toc: true --- +Published on 2022-11-15, last updated on 2022-11-20. + Making and managing this personal website has been an adventure. In this series, I go over the technical challenges I've encountered and philosophical decisions I've made, and I review some of the tools I've used along the way. -This is part 1, with more posts coming soon. +This is part 1, followed by [part 2](/blog/2022/website-adventures-basics/), +with more coming. @@ -201,14 +204,17 @@ after a few small tweaks like adding a navigation bar at the top of the page: ``` On the one hand, Hugo provides the convenient `.TableOfContents` variable -at the cost of control, unlike Zola, where we had to do it manually. -On the other hand, Hugo doesn't use block-based templates -and hence lacks a nice inheritance system like Zola's. -If you want to reuse a snippet, you put it in a file e.g. `navbar.html` +at the cost of control, unlike Zola, where we had to do it +manually. ~~On the other hand, Hugo doesn't use block-based templates +and hence lacks a nice inheritance system like Zola's~~ +[I stand corrected](https://lobste.rs/s/x2bknz/adventures_making_my_website_static_site#c_jbmpl2), +Hugo can do [Zola-style blocks](https://gohugo.io/templates/base/), +but it's hard to figure this out on your own. +If you want to reuse a snippet, you typically put it in a file e.g. `navbar.html` and include it as `{% raw %}{{ partial "navbar.html" . }}{% endraw %}`. Note the dot at the end... I'll get to that. -Overall, Hugo's approach to organizing templates feels "dumber" than Zola's, -although, to be fair, my website had become a lot more complicated by then. +Overall, Hugo's template organization feels "dumber" than Zola's, +although my requirements had become a lot more complicated by then. Like most SSGs, Hugo uses an external template engine, namely the [`text/template`](https://pkg.go.dev/text/template) Go package. @@ -472,3 +478,10 @@ Personally, compared to those two, I wouldn't recommend Hugo, but for some people (probably Go developers) it just might be what they're looking for. +EDIT: There exists an SSG called [Soupault](https://soupault.app/) +that has interesting alternative take on site generation. +Its creator [pitched it to me](https://lobste.rs/s/x2bknz/adventures_making_my_website_static_site#c_cgemzs), +and coincidentally its website includes [this comparison](https://soupault.app/tips-and-tricks/comparison) +with the SSGs discussed in this article. +Like I said, I don't intend to migrate again, like, *ever*, +so I'm writing this to spread the word about an, in my opinion, intriguing project. -- cgit v1.2.3