Compare commits

..

No commits in common. "7e456bb9c56206a913cba6e4d42985ed8e1383e7" and "4440393cf1fc3726d5c3f92f46990b928e52e8ac" have entirely different histories.

9 changed files with 59 additions and 172 deletions

View file

@ -5,24 +5,14 @@ packages:
- uv - uv
environment: environment:
site: ficd.sh site: ficd.sh
draft_site: draft.ficd.sh
proxy: ficd.srht.site proxy: ficd.srht.site
repo: ficd.sh repo: ficd.sh
zona_repo: git+https://git.sr.ht/~ficd/zona zonaref: git+https://git.sr.ht/~ficd/zona@b8b8fef72c741606ed1165a0c07c42cca8060176
zona_ref: 71e541aa5e02a3e28a8b62bc7a1e609a9f6f7b78
tasks: tasks:
- build: | - build: |
if [ "$GIT_REF" = "refs/heads/main" ]; then if [ "$GIT_REF" = "refs/heads/main" ]; then
cd $repo cd $repo
uv run --with "${zona_repo}@${zona_ref}" zona build --output public uv run --with "$zonaref" zona build
else
echo "Skipping build: not on main"
fi
- build_draft: |
if [ "$GIT_REF" = "refs/heads/main" ]; then
cd $repo
uv run --with "${zona_repo}@${zona_ref}" zona build --output public-draft --draft
else else
echo "Skipping build: not on main" echo "Skipping build: not on main"
fi fi
@ -35,14 +25,6 @@ tasks:
echo "Skipping package: not on main" echo "Skipping package: not on main"
fi fi
- package_draft: |
if [ "$GIT_REF" = "refs/heads/main" ]; then
cd $repo/public-draft
tar -cvz . > ../public-draft.tar.gz
else
echo "Skipping package: not on main"
fi
- upload: | - upload: |
if [ "$GIT_REF" = "refs/heads/main" ]; then if [ "$GIT_REF" = "refs/heads/main" ]; then
hut pages publish -d "$site" $repo/public.tar.gz hut pages publish -d "$site" $repo/public.tar.gz
@ -50,9 +32,3 @@ tasks:
else else
echo "Skipping upload: not on main" echo "Skipping upload: not on main"
fi fi
- upload_draft: |
if [ "$GIT_REF" = "refs/heads/main" ]; then
hut pages publish -d "$draft_site" $repo/public-draft.tar.gz
else
echo "Skipping upload: not on main"
fi

View file

@ -4,7 +4,6 @@ sitemap:
About: /about About: /about
Blog: /blog Blog: /blog
Now: /now Now: /now
Git: /git
Contact: /contact Contact: /contact
ignore: ignore:
- .git - .git

View file

@ -1,5 +1,5 @@
--- ---
title: About title: About Me
--- ---
My name is Daniel, and I am a programmer, Linux enthusiast, and graduate My name is Daniel, and I am a programmer, Linux enthusiast, and graduate
@ -10,16 +10,14 @@ code, tinkering, and contributing to open-source projects. Feel free to
work. work.
I'm the author [zona] (a static site generator), [Ashen] (a color scheme), I'm the author [zona] (a static site generator), [Ashen] (a color scheme),
and a number of [Kakoune] plugins. Check my various [Git] forge profiles and a number of [Kakoune] plugins. You can find my latest work on my
to see my latest work. profile, [~ficd].
[zona]: https://sr.ht/~ficd/zona [zona]: https://sr.ht/~ficd/zona
[Git]: /git [~ficd]: https://git.sr.ht/~ficd
[Ashen]: https://sr.ht/~ficd/ashen [Ashen]: https://sr.ht/~ficd/ashen
[Kakoune]: https://kakoune.org [Kakoune]: https://kakoune.org
## Education
I completed a Bachelor's of Computing (Honours) at Queen's University in I completed a Bachelor's of Computing (Honours) at Queen's University in
2024, and I'm currently in the Master's of Science program at the School 2024, and I'm currently in the Master's of Science program at the School
of Computing. As part of the NSERC CREATE Cybersecurity program, my work of Computing. As part of the NSERC CREATE Cybersecurity program, my work
@ -28,17 +26,13 @@ tackle real-world security challenges. I'm currently working on my thesis,
which introduces a novel method of detecting signal relay attacks in the which introduces a novel method of detecting signal relay attacks in the
context of multi-factor authentication. context of multi-factor authentication.
## Stack I use Kakoune as my text editor, and I type in
I use [Kakoune] as my text editor, and I type in
[Colemak-DH](https://colemakmods.github.io/mod-dh/) on a [Colemak-DH](https://colemakmods.github.io/mod-dh/) on a
[custom layout](https://sr.ht/~ficd/zmk). I run Arch Linux on a desktop PC [custom layout](https://sr.ht/~ficd/zmk). I run Arch Linux on a desktop PC
and ThinkPad, my preferred terminal is Foot, and I enjoy Niri as a window and ThinkPad, my preferred terminal is Foot, and I've been enjoying Niri
manager. as a window manager.
## This Website This website is registered on [1mb.club](https://1mb.club/) and
[jsfree.org](https://jsfree.org/). It's published at
This website is my personal blog and homepage. It's [ficd.sh](https://ficd.sh), and a proxy is available at
[JavaScript free](https://jsfree.org/), and registered on [ficd.srht.site](https://ficd.srht.site)
[1mb.club](https://1mb.club/). The color scheme is [Ashen], and it was
built using [zona].

View file

@ -1,91 +1,71 @@
--- ---
title: Building My Own Static Site Generator title: Building My Own Static Site Generator
date: 2025-07-10 date: July 6, 2025
draft: true draft: true
--- ---
*[SSG]: Static Site Generator *[SSG]: Static Site Generator
[homebrewed]: https://en.wikipedia.org/wiki/Homebrewing *[homebrewed]: Self-made, intended for personal use.
[zona]: https://sr.ht/~ficd/zona [zona]: https://sr.ht/~ficd/zona
[Hugo]: https://gohugo.io/ [Hugo]: https://gohugo.io/
[Zola]: https://www.getzola.org/ [Zola]: https://www.getzola.org/
[Jekyll]: https://jekyllrb.com/ [Jekyll]: https://jekyllrb.com/
[Zoner]: https://zone-builder.neocities.org/
[Zonelets]: https://zonelets.net/
[Neocities]: https://neocities.org
[^jd]: [jdugan6240.dev](https://jdugan6240.dev/posts/custom_site_generator.html#why) [^jd]: [jdugan6240.dev](https://jdugan6240.dev/posts/custom_site_generator.html#why)
[^long-sentence]: I disabled the "long sentences" linter in my grammar Those of us in the open-source world tend to be very _passionate_ about what we
checker. Take that for being unapologetic! do — and passion often manifests itself in _blogging_. Rolling your own blogging
setup seems to be a rite of passage. It's a project of moderate complexity, fun,
and not particularly time-consuming.
[^small-web]: The "small web" is a way to collectively refer to Personal websites and blogs are very... personal. Why not maximize the control
independent, home-made, personal websites --- often with a focus on we have over them? Many of the programmers I respect publish blogs using a
creativity, anti-capitalism, and technology. homebrewed SSG. I figured it was time to join them!
Those of us in the open-source world tend to be very _passionate_ about
what we do — and passion often manifests itself in _blogging_. Rolling
your own blogging setup seems to be a rite of passage. It's a project of
moderate complexity, fun, and not particularly time-consuming.
Personal websites and blogs are very... personal. Why not maximize the
control we have over them? Many of the programmers I respect publish blogs
using a [homebrewed] SSG. I figured it was time to join them!
This article is about how (and why) I built [zona], the SSG that built and This article is about how (and why) I built [zona], the SSG that built and
rendered the blog post you're reading. Without any further ado, let's get rendered the very sentence you're reading. Without any further ado, let's get
into it! into it.
[TOC] [TOC]
## Zonelets & Zoner
I don't remember how I found out about the small web,[^small-web], but I
_do_ recall how it immediately sparked something in me. As an autist with
very particular interests that's always struggled to fit in, the premise
of having my very own corner of the internet where I could
unapologetically be myself without fear of retribution from rude
social-media commenters or being subject to the whims of some grumpy
content moderator was _very_ appealing to me.[^long-sentence]
## Reinventing The Wheel ## Reinventing The Wheel
There's no shortage of excellent SSG tools out there. [Hugo] is fast, There's no shortage of excellent SSG tools out there. [Hugo] is fast,
configurable, and very popular. [Jekyll] is the default on GitHub pages, configurable, and very popular. [Jekyll] is the default on GitHub pages, which
which makes it _(I'm guessing)_ the most commonly-used SSG by a long shot. makes it _(I'm guessing)_ the most commonly-used SSG by a long shot. [Zola] is
[Zola] is tiny, dependency free, and _very_ flexible. tiny, dependency free, and _very_ flexible.
You can certainly build some awesome blogs with these tools, and customize You can certainly build some awesome blogs with these tools, and customize them
them as much as you want. For example, my friend Alisa uses [Zola] to as much as you want. For example, my friend Alisa uses [Zola] to publish
publish [her blog](https://axlefublr.github.io/), which is a great example [her blog](https://axlefublr.github.io/), which is a great example of how a
of how a minimal website can truly shine with the right styling and minimal website can truly shine with the right styling and customization.
customization.
So: if there's such an abundance of great static site generators, why did So: if there's such an abundance of great static site generators, why did I
I write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well: write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well:
> 1. It's a good learning experience \[...\] > 1. It's a good learning experience \[...\]
> 2. Many static site generators are complex and take time to learn to > 2. Many static site generators are complex and take time to learn to configure
> configure \[...\] > \[...\]
> 3. A custom solution grants complete control over how exactly the site > 3. A custom solution grants complete control over how exactly the site is
> is generated \[...\] > generated \[...\]
My main motivation for starting work on [zona] was the third point: My main motivation for starting work on [zona] was the third point: **complete
**complete control**. I don't think being a control freak makes me an control**. I don't think being a control freak makes me an outlier among Linux
outlier among Linux users — why else would we be breaking our operating users — why else would we be breaking our operating system near-daily, if not
system near-daily, if not for some obsessive customization? for some obsessive customization?
It's happened very often that I find some tool I like, and during the It's happened very often that I find some tool I like, and during the process of
process of tweaking it, I find _something_ that can't be changed --- which tweaking it, I find _something_ that can't be changed --- which ends up
ends up bothering me immensely. I figured that I'd rather avoid this bothering me immensely. I figured that I'd rather avoid this experience while
experience while writing my own blog. This way, if something is missing, writing my own blog. This way, if something is missing, it's my fault, and no
it's my fault, and no one else's. one else's.
## Requirements ## Requirements
The features I implemented in [zona] are informed by what I want from my The features I implemented in [zona] are informed by what I want from my own
own blog. The primary user is myself, after all! I knew I wanted: blog. The primary user is myself, after all! I knew I wanted:
- Writing in Markdown with as little embedded HTML as possible. - Writing in Markdown with as little embedded HTML as possible.
- A convenient live preview. - A convenient live preview.
@ -94,8 +74,7 @@ own blog. The primary user is myself, after all! I knew I wanted:
- Declarative configuration. - Declarative configuration.
- An easy way to add new posts. - An easy way to add new posts.
## Snakes Eating Gophers: A Valiant First Attempt ## Gophers And Snakes
I started work on [zona] in October, 2024. At this point, I had written a I started work on [zona] in October, 2024. At this point, I had written a few
few (smaller) projects in Go, and I wanted to work on something more (smaller) projects in Go, and I wanted to work on something more complicated.
complicated to learn the language better.

View file

@ -1,15 +0,0 @@
---
title: Git
---
[git.ficd.sh]: https://git.ficd.sh/ficd
[git.sr.ht]: https://git.sr.ht/~ficd
[codeberg]: https://codeberg.org/ficd
[github]: https://github.com/ficcdaf
My forge profiles, in order of precedence:
- [git.ficd.sh] (self-hosted)
- [git.sr.ht]
- [codeberg]
- [github]

View file

@ -1,5 +1,5 @@
--- ---
title: ficd.sh title: Home
show_title: false show_title: false
--- ---
@ -11,13 +11,12 @@ show_title: false
<div class="fixed" markdown="1"> <div class="fixed" markdown="1">
![Me (approximate likeness).](/static/images/dithered_ficd.jpg) ![](/static/images/dithered_ficd.jpg)
</div> </div>
<center markdown="1"> <center markdown="1">
I write software. Allegedly.\ Hello. I write programming code.
Direct complaints to `>/dev/null 2>&1`.
</center> </center>

View file

@ -17,46 +17,6 @@ body {
padding-left: calc(100vw - 100%); padding-left: calc(100vw - 100%);
} }
.toclink {
position: relative;
text-decoration: none;
color: inherit;
}
.toclink::before {
content: "#";
position: absolute;
right: 100%;
margin-right: 0.25em;
top: 50%;
transform: translateY(-50%);
opacity: 0;
transition: opacity 0.2s ease;
}
h1 .toclink::before {
content: "#";
}
h2 .toclink::before {
content: "#";
}
h3 .toclink::before {
content: "##";
}
h4 .toclink::before {
content: "###";
}
.toclink:hover::before {
opacity: 1;
}
.toclink:hover {
background-color: transparent;
}
/* h1, */ /* h1, */
h2, h2,
h3, h3,
@ -170,7 +130,7 @@ pre {
white-space: pre; white-space: pre;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
font-family: monospace; font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
font-size: 0.95em; font-size: 0.95em;
} }
@ -323,7 +283,7 @@ tbody tr:hover {
} }
table code { table code {
font-family: monospace; font-family: 'Fira Code', 'Consolas', monospace;
font-size: 0.85em; font-size: 0.85em;
background: #1d1d1d; background: #1d1d1d;
padding: 0.1em 0.25em; padding: 0.1em 0.25em;

View file

@ -1,13 +1,11 @@
<center markdown="1"> <center markdown="1">
[©] Daniel Fichtinger, 2025\ [©] Daniel Fichtinger, 2025.\
[open source]\ [Open source], built with [zona], hosted on [sourcehut].
built with [zona]
[©]: https://creativecommons.org/licenses/by-nc-sa/4.0 [©]: https://creativecommons.org/licenses/by-nc-sa/4.0
[zona]: https://sr.ht/~ficd/zona [zona]: https://sr.ht/~ficd/zona
[sourcehut]: https://srht.site/ [sourcehut]: https://srht.site/
[Open source]: https://git.sr.ht/~ficd/ficd.sh [Open source]: https://git.sr.ht/~ficd/ficd.sh
[ficd.sh]: https://ficd.sh
</center> </center>

View file

@ -1,6 +1,3 @@
<center>
<pre><a href="/" style="color: inherit; text-decoration: none;">ficd.sh</a></pre>
</center>
<ul> <ul>
{% for name, url in site_map.items() %} {% for name, url in site_map.items() %}
<li><a href="{{ url }}">{{ name }}</a></li> <li><a href="{{ url }}">{{ name }}</a></li>