Initially, I built my website with Hugo, but I’ve decided to switch to Zine.
Hugo
To create a Hugo website, you should write YAML. This sentence has definitely dropped a non negligible amount of people.
I have these lines in the yaml config file:
privacy:
twitter:
disabled: true
enableDNT: true
simple: true
# ...
services:
instagram:
disableInlineCSS: true
twitter:
disableInlineCSS: true
Do I remember what’s that? No.
To add social links, I put some magic lines into the config:
socialIcons:
- name: github
title: View my Github
url: "https://github.com/knightpp"
- name: mastodon
title: View my Mastodon
url: https://mastodon.knightpp.cc/@knightpp
In other words, I don’t feel like I have full control over the website’s generation.
Zine
Zine is a lot more simple. You still need to setup some .ziggy files, but template generation is exposed, allowing for experimentation.
Wait, there’s more. The author built superhtml from the ground up! It can format HTML files and more importatly serve as an LSP implementation! See also scripty, supermd.
This is how I display available languages:
<div :loop="$page.locales()">
<ctx :if="$loop.it.site().localeCode().eql($site.localeCode()).not()"
locale="$loop.it.site().localeName()"
>
<a href="$loop.it.link()" :text="$ctx.locale"></a>
</ctx>
</div>
And here’s how to create conditions within templates:
<ctx :if="$site.page('devlog').subpages().first?()">
•
<a href="$if.link()" :text="$i18n.get('Devlog')"></a>
</ctx>
Great! Say no to ugly templates like this:
{{if .IsAttachment}}
<a href="">...</a>
{{else}}{{if .IsMenu}}
<hr>
{{else}}
<div>Everything else</div>
{{end}}{{end}}
You probably already noticed everything was written in Zig.