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
|
- 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
|
||||||
zonaref: git+https://git.sr.ht/~ficd/zona@b8b8fef72c741606ed1165a0c07c42cca8060176
|
zona_repo: git+https://git.sr.ht/~ficd/zona
|
||||||
|
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 "$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
|
else
|
||||||
echo "Skipping build: not on main"
|
echo "Skipping build: not on main"
|
||||||
fi
|
fi
|
||||||
|
@ -25,6 +35,14 @@ 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
|
||||||
|
@ -32,3 +50,9 @@ 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
|
||||||
|
|
|
@ -4,6 +4,7 @@ sitemap:
|
||||||
About: /about
|
About: /about
|
||||||
Blog: /blog
|
Blog: /blog
|
||||||
Now: /now
|
Now: /now
|
||||||
|
Git: /git
|
||||||
Contact: /contact
|
Contact: /contact
|
||||||
ignore:
|
ignore:
|
||||||
- .git
|
- .git
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
title: About Me
|
title: About
|
||||||
---
|
---
|
||||||
|
|
||||||
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,14 +10,16 @@ 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. You can find my latest work on my
|
and a number of [Kakoune] plugins. Check my various [Git] forge profiles
|
||||||
profile, [~ficd].
|
to see my latest work.
|
||||||
|
|
||||||
[zona]: https://sr.ht/~ficd/zona
|
[zona]: https://sr.ht/~ficd/zona
|
||||||
[~ficd]: https://git.sr.ht/~ficd
|
[Git]: /git
|
||||||
[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
|
||||||
|
@ -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
|
which introduces a novel method of detecting signal relay attacks in the
|
||||||
context of multi-factor authentication.
|
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
|
[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've been enjoying Niri
|
and ThinkPad, my preferred terminal is Foot, and I enjoy Niri as a window
|
||||||
as a window manager.
|
manager.
|
||||||
|
|
||||||
This website is registered on [1mb.club](https://1mb.club/) and
|
## This Website
|
||||||
[jsfree.org](https://jsfree.org/). It's published at
|
|
||||||
[ficd.sh](https://ficd.sh), and a proxy is available at
|
This website is my personal blog and homepage. It's
|
||||||
[ficd.srht.site](https://ficd.srht.site)
|
[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
|
title: Building My Own Static Site Generator
|
||||||
date: July 6, 2025
|
date: 2025-07-10
|
||||||
draft: true
|
draft: true
|
||||||
---
|
---
|
||||||
|
|
||||||
*[SSG]: Static Site Generator
|
*[SSG]: Static Site Generator
|
||||||
|
|
||||||
*[homebrewed]: Self-made, intended for personal use.
|
[homebrewed]: https://en.wikipedia.org/wiki/Homebrewing
|
||||||
|
|
||||||
[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)
|
||||||
|
|
||||||
Those of us in the open-source world tend to be very _passionate_ about what we
|
[^long-sentence]: I disabled the "long sentences" linter in my grammar
|
||||||
do — and passion often manifests itself in _blogging_. Rolling your own blogging
|
checker. Take that for being unapologetic!
|
||||||
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
|
[^small-web]: The "small web" is a way to collectively refer to
|
||||||
we have over them? Many of the programmers I respect publish blogs using a
|
independent, home-made, personal websites --- often with a focus on
|
||||||
homebrewed SSG. I figured it was time to join them!
|
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
|
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
|
rendered the blog post 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, which
|
configurable, and very popular. [Jekyll] is the default on GitHub pages,
|
||||||
makes it _(I'm guessing)_ the most commonly-used SSG by a long shot. [Zola] is
|
which makes it _(I'm guessing)_ the most commonly-used SSG by a long shot.
|
||||||
tiny, dependency free, and _very_ flexible.
|
[Zola] is tiny, dependency free, and _very_ flexible.
|
||||||
|
|
||||||
You can certainly build some awesome blogs with these tools, and customize them
|
You can certainly build some awesome blogs with these tools, and customize
|
||||||
as much as you want. For example, my friend Alisa uses [Zola] to publish
|
them as much as you want. For example, my friend Alisa uses [Zola] to
|
||||||
[her blog](https://axlefublr.github.io/), which is a great example of how a
|
publish [her blog](https://axlefublr.github.io/), which is a great example
|
||||||
minimal website can truly shine with the right styling and customization.
|
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
|
So: if there's such an abundance of great static site generators, why did
|
||||||
write my own? JD[^jd], a fellow Kakoune enjoyer, puts it well:
|
I 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 configure
|
> 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
|
> 3. A custom solution grants complete control over how exactly the site
|
||||||
> generated \[...\]
|
> is generated \[...\]
|
||||||
|
|
||||||
My main motivation for starting work on [zona] was the third point: **complete
|
My main motivation for starting work on [zona] was the third point:
|
||||||
control**. I don't think being a control freak makes me an outlier among Linux
|
**complete control**. I don't think being a control freak makes me an
|
||||||
users — why else would we be breaking our operating system near-daily, if not
|
outlier among Linux users — why else would we be breaking our operating
|
||||||
for some obsessive customization?
|
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
|
It's happened very often that I find some tool I like, and during the
|
||||||
tweaking it, I find _something_ that can't be changed --- which ends up
|
process of tweaking it, I find _something_ that can't be changed --- which
|
||||||
bothering me immensely. I figured that I'd rather avoid this experience while
|
ends up bothering me immensely. I figured that I'd rather avoid this
|
||||||
writing my own blog. This way, if something is missing, it's my fault, and no
|
experience while writing my own blog. This way, if something is missing,
|
||||||
one else's.
|
it's my fault, and no one else's.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
The features I implemented in [zona] are informed by what I want from my own
|
The features I implemented in [zona] are informed by what I want from my
|
||||||
blog. The primary user is myself, after all! I knew I wanted:
|
own 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.
|
||||||
|
@ -74,7 +94,8 @@ 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.
|
||||||
|
|
||||||
## 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
|
I started work on [zona] in October, 2024. At this point, I had written a
|
||||||
(smaller) projects in Go, and I wanted to work on something more complicated.
|
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
|
show_title: false
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -11,12 +11,13 @@ show_title: false
|
||||||
|
|
||||||
<div class="fixed" markdown="1">
|
<div class="fixed" markdown="1">
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<center markdown="1">
|
<center markdown="1">
|
||||||
|
|
||||||
Hello. I write programming code.
|
I write software. Allegedly.\
|
||||||
|
Direct complaints to `>/dev/null 2>&1`.
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
|
@ -17,6 +17,46 @@ 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,
|
||||||
|
@ -130,7 +170,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: 'Fira Code', 'Consolas', 'Courier New', monospace;
|
font-family: monospace;
|
||||||
font-size: 0.95em;
|
font-size: 0.95em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,7 +323,7 @@ tbody tr:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
table code {
|
table code {
|
||||||
font-family: 'Fira Code', 'Consolas', monospace;
|
font-family: monospace;
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
background: #1d1d1d;
|
background: #1d1d1d;
|
||||||
padding: 0.1em 0.25em;
|
padding: 0.1em 0.25em;
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
<center markdown="1">
|
<center markdown="1">
|
||||||
|
|
||||||
[©] Daniel Fichtinger, 2025.\
|
[©] Daniel Fichtinger, 2025\
|
||||||
[Open source], built with [zona], hosted on [sourcehut].
|
[open source]\
|
||||||
|
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>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
<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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue