Compare commits
10 commits
4440393cf1
...
7e456bb9c5
Author | SHA1 | Date | |
---|---|---|---|
7e456bb9c5 | |||
85dda9800d | |||
7be58dcbc2 | |||
e04a587e8f | |||
edeb2fb9ac | |||
80b1603f96 | |||
fd8d829d77 | |||
763a80a96b | |||
5a4dfdbb33 | |||
f5b5903404 |
9 changed files with 172 additions and 59 deletions
28
.build.yml
28
.build.yml
|
@ -5,14 +5,24 @@ packages:
|
|||
- uv
|
||||
environment:
|
||||
site: ficd.sh
|
||||
draft_site: draft.ficd.sh
|
||||
proxy: ficd.srht.site
|
||||
repo: ficd.sh
|
||||
zonaref: git+https://git.sr.ht/~ficd/zona@b8b8fef72c741606ed1165a0c07c42cca8060176
|
||||
zona_repo: git+https://git.sr.ht/~ficd/zona
|
||||
zona_ref: 71e541aa5e02a3e28a8b62bc7a1e609a9f6f7b78
|
||||
tasks:
|
||||
- build: |
|
||||
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||
cd $repo
|
||||
uv run --with "$zonaref" zona build
|
||||
uv run --with "${zona_repo}@${zona_ref}" zona build --output public
|
||||
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
|
||||
echo "Skipping build: not on main"
|
||||
fi
|
||||
|
@ -25,6 +35,14 @@ tasks:
|
|||
echo "Skipping package: not on main"
|
||||
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: |
|
||||
if [ "$GIT_REF" = "refs/heads/main" ]; then
|
||||
hut pages publish -d "$site" $repo/public.tar.gz
|
||||
|
@ -32,3 +50,9 @@ tasks:
|
|||
else
|
||||
echo "Skipping upload: not on main"
|
||||
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
|
||||
|
|
|
@ -4,6 +4,7 @@ sitemap:
|
|||
About: /about
|
||||
Blog: /blog
|
||||
Now: /now
|
||||
Git: /git
|
||||
Contact: /contact
|
||||
ignore:
|
||||
- .git
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: About Me
|
||||
title: About
|
||||
---
|
||||
|
||||
My name is Daniel, and I am a programmer, Linux enthusiast, and graduate
|
||||
|
@ -10,14 +10,16 @@ code, tinkering, and contributing to open-source projects. Feel free to
|
|||
work.
|
||||
|
||||
I'm the author [zona] (a static site generator), [Ashen] (a color scheme),
|
||||
and a number of [Kakoune] plugins. You can find my latest work on my
|
||||
profile, [~ficd].
|
||||
and a number of [Kakoune] plugins. Check my various [Git] forge profiles
|
||||
to see my latest work.
|
||||
|
||||
[zona]: https://sr.ht/~ficd/zona
|
||||
[~ficd]: https://git.sr.ht/~ficd
|
||||
[Git]: /git
|
||||
[Ashen]: https://sr.ht/~ficd/ashen
|
||||
[Kakoune]: https://kakoune.org
|
||||
|
||||
## Education
|
||||
|
||||
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
|
||||
of Computing. As part of the NSERC CREATE Cybersecurity program, my work
|
||||
|
@ -26,13 +28,17 @@ tackle real-world security challenges. I'm currently working on my thesis,
|
|||
which introduces a novel method of detecting signal relay attacks in the
|
||||
context of multi-factor authentication.
|
||||
|
||||
I use Kakoune as my text editor, and I type in
|
||||
## Stack
|
||||
|
||||
I use [Kakoune] as my text editor, and I type in
|
||||
[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
|
||||
and ThinkPad, my preferred terminal is Foot, and I've been enjoying Niri
|
||||
as a window manager.
|
||||
and ThinkPad, my preferred terminal is Foot, and I enjoy Niri as a window
|
||||
manager.
|
||||
|
||||
This website is registered on [1mb.club](https://1mb.club/) and
|
||||
[jsfree.org](https://jsfree.org/). It's published at
|
||||
[ficd.sh](https://ficd.sh), and a proxy is available at
|
||||
[ficd.srht.site](https://ficd.srht.site)
|
||||
## This Website
|
||||
|
||||
This website is my personal blog and homepage. It's
|
||||
[JavaScript free](https://jsfree.org/), and registered on
|
||||
[1mb.club](https://1mb.club/). The color scheme is [Ashen], and it was
|
||||
built using [zona].
|
||||
|
|
|
@ -1,71 +1,91 @@
|
|||
---
|
||||
title: Building My Own Static Site Generator
|
||||
date: July 6, 2025
|
||||
date: 2025-07-10
|
||||
draft: true
|
||||
---
|
||||
|
||||
*[SSG]: Static Site Generator
|
||||
|
||||
*[homebrewed]: Self-made, intended for personal use.
|
||||
|
||||
[homebrewed]: https://en.wikipedia.org/wiki/Homebrewing
|
||||
[zona]: https://sr.ht/~ficd/zona
|
||||
[Hugo]: https://gohugo.io/
|
||||
[Zola]: https://www.getzola.org/
|
||||
[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)
|
||||
|
||||
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.
|
||||
[^long-sentence]: I disabled the "long sentences" linter in my grammar
|
||||
checker. Take that for being unapologetic!
|
||||
|
||||
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!
|
||||
[^small-web]: The "small web" is a way to collectively refer to
|
||||
independent, home-made, personal websites --- often with a focus on
|
||||
creativity, anti-capitalism, and technology.
|
||||
|
||||
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
|
||||
rendered the very sentence you're reading. Without any further ado, let's get
|
||||
into it.
|
||||
rendered the blog post you're reading. Without any further ado, let's get
|
||||
into it!
|
||||
|
||||
[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
|
||||
|
||||
There's no shortage of excellent SSG tools out there. [Hugo] is fast,
|
||||
configurable, and very popular. [Jekyll] is the default on GitHub pages, which
|
||||
makes it _(I'm guessing)_ the most commonly-used SSG by a long shot. [Zola] is
|
||||
tiny, dependency free, and _very_ flexible.
|
||||
configurable, and very popular. [Jekyll] is the default on GitHub pages,
|
||||
which makes it _(I'm guessing)_ the most commonly-used SSG by a long shot.
|
||||
[Zola] is tiny, dependency free, and _very_ flexible.
|
||||
|
||||
You can certainly build some awesome blogs with these tools, and customize them
|
||||
as much as you want. For example, my friend Alisa uses [Zola] to publish
|
||||
[her blog](https://axlefublr.github.io/), which is a great example of how a
|
||||
minimal website can truly shine with the right styling and customization.
|
||||
You can certainly build some awesome blogs with these tools, and customize
|
||||
them as much as you want. For example, my friend Alisa uses [Zola] to
|
||||
publish [her blog](https://axlefublr.github.io/), which is a great example
|
||||
of how a minimal website can truly shine with the right styling and
|
||||
customization.
|
||||
|
||||
So: if there's such an abundance of great static site generators, why did I
|
||||
write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well:
|
||||
So: if there's such an abundance of great static site generators, why did
|
||||
I write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well:
|
||||
|
||||
> 1. It's a good learning experience \[...\]
|
||||
> 2. Many static site generators are complex and take time to learn to configure
|
||||
> \[...\]
|
||||
> 3. A custom solution grants complete control over how exactly the site is
|
||||
> generated \[...\]
|
||||
> 2. Many static site generators are complex and take time to learn to
|
||||
> configure \[...\]
|
||||
> 3. A custom solution grants complete control over how exactly the site
|
||||
> is generated \[...\]
|
||||
|
||||
My main motivation for starting work on [zona] was the third point: **complete
|
||||
control**. I don't think being a control freak makes me an outlier among Linux
|
||||
users — why else would we be breaking our operating system near-daily, if not
|
||||
for some obsessive customization?
|
||||
My main motivation for starting work on [zona] was the third point:
|
||||
**complete control**. I don't think being a control freak makes me an
|
||||
outlier among Linux users — why else would we be breaking our operating
|
||||
system near-daily, if not for some obsessive customization?
|
||||
|
||||
It's happened very often that I find some tool I like, and during the process of
|
||||
tweaking it, I find _something_ that can't be changed --- which ends up
|
||||
bothering me immensely. I figured that I'd rather avoid this experience while
|
||||
writing my own blog. This way, if something is missing, it's my fault, and no
|
||||
one else's.
|
||||
It's happened very often that I find some tool I like, and during the
|
||||
process of tweaking it, I find _something_ that can't be changed --- which
|
||||
ends up bothering me immensely. I figured that I'd rather avoid this
|
||||
experience while writing my own blog. This way, if something is missing,
|
||||
it's my fault, and no one else's.
|
||||
|
||||
## Requirements
|
||||
|
||||
The features I implemented in [zona] are informed by what I want from my own
|
||||
blog. The primary user is myself, after all! I knew I wanted:
|
||||
The features I implemented in [zona] are informed by what I want from my
|
||||
own blog. The primary user is myself, after all! I knew I wanted:
|
||||
|
||||
- Writing in Markdown with as little embedded HTML as possible.
|
||||
- A convenient live preview.
|
||||
|
@ -74,7 +94,8 @@ blog. The primary user is myself, after all! I knew I wanted:
|
|||
- Declarative configuration.
|
||||
- An easy way to add new posts.
|
||||
|
||||
## Gophers And Snakes
|
||||
## Snakes Eating Gophers: A Valiant First Attempt
|
||||
|
||||
I started work on [zona] in October, 2024. At this point, I had written a few
|
||||
(smaller) projects in Go, and I wanted to work on something more complicated.
|
||||
I started work on [zona] in October, 2024. At this point, I had written a
|
||||
few (smaller) projects in Go, and I wanted to work on something more
|
||||
complicated to learn the language better.
|
||||
|
|
15
content/git.md
Normal file
15
content/git.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
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]
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Home
|
||||
title: ficd.sh
|
||||
show_title: false
|
||||
---
|
||||
|
||||
|
@ -11,12 +11,13 @@ show_title: false
|
|||
|
||||
<div class="fixed" markdown="1">
|
||||
|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
<center markdown="1">
|
||||
|
||||
Hello. I write programming code.
|
||||
I write software. Allegedly.\
|
||||
Direct complaints to `>/dev/null 2>&1`.
|
||||
|
||||
</center>
|
||||
|
|
|
@ -17,6 +17,46 @@ body {
|
|||
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, */
|
||||
h2,
|
||||
h3,
|
||||
|
@ -130,7 +170,7 @@ pre {
|
|||
white-space: pre;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
|
||||
font-family: monospace;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
|
@ -283,7 +323,7 @@ tbody tr:hover {
|
|||
}
|
||||
|
||||
table code {
|
||||
font-family: 'Fira Code', 'Consolas', monospace;
|
||||
font-family: monospace;
|
||||
font-size: 0.85em;
|
||||
background: #1d1d1d;
|
||||
padding: 0.1em 0.25em;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<center markdown="1">
|
||||
|
||||
[©] Daniel Fichtinger, 2025.\
|
||||
[Open source], built with [zona], hosted on [sourcehut].
|
||||
[©] Daniel Fichtinger, 2025\
|
||||
[open source]\
|
||||
built with [zona]
|
||||
|
||||
[©]: https://creativecommons.org/licenses/by-nc-sa/4.0
|
||||
[zona]: https://sr.ht/~ficd/zona
|
||||
[sourcehut]: https://srht.site/
|
||||
[Open source]: https://git.sr.ht/~ficd/ficd.sh
|
||||
[ficd.sh]: https://ficd.sh
|
||||
|
||||
</center>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<center>
|
||||
<pre><a href="/" style="color: inherit; text-decoration: none;">ficd.sh</a></pre>
|
||||
</center>
|
||||
<ul>
|
||||
{% for name, url in site_map.items() %}
|
||||
<li><a href="{{ url }}">{{ name }}</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue