Comments - Take 3 - On Zola

A while ago I added comments for my Jekyll base blog. Since then, I switched to zola. Its basically a Rust based “clone” of the static site generator (SSG) Hugo. Compared to Jekyll, it is a lot faster, and I found it to be a lot simpler. However, Zola has its own set of challenges. For instance, changing themes is nearly impossible and theme extension can get messy. That is the story for a future post. At some point I might consider creating my own SSG. Building a small one should be easy enough (and due to GitHub’s Actions it could be used immediately). ...

November 3, 2023

Comments for static pages? - Part 2

Looking back… I need a bit of DIY GitHub API for Rust. Still step 2: Create a branch and PR automatically Thankfully, the V3 API is really simple. Using our tRusty language, we can define some structs to be serialized to JSON for requests: #[derive(Serialize)] struct CreateRef { r#ref: String, // The name to be used sha: String, // The commit SHA to point to } #[derive(Serialize)] struct CreateFile { message: String, content: String, branch: String, committer: UserRef, } #[derive(Serialize)] struct UserRef { name: String, email: String, } #[derive(Serialize)] struct CreatePR { title: String, head: String, // The branch to be merged base: String, // The target branch for the merge (ie. master) } The basic steps we want to do are described by these: ...

January 25, 2020

Comments for static pages? - Part 1

This is actually a static page hosted by GitHub, powered by Jekyll. But how to get a comment section? Give Me Comments Weeeelll…. You could use a service like Disqus. Or, you use the idea from damieng. Jekyll has a neat feature: you can place data files under _data and access in Liquid templates. And that’s more or less the starting point. Add comments as data and render them via Jekyll (utilizing Liquid). ...

January 21, 2020