diff --git a/.build.yml b/.build.yml index 569d4db..3562911 100644 --- a/.build.yml +++ b/.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 diff --git a/config.yml b/config.yml index 256fadc..d496484 100644 --- a/config.yml +++ b/config.yml @@ -4,6 +4,7 @@ sitemap: About: /about Blog: /blog Now: /now + Git: /git Contact: /contact ignore: - .git diff --git a/content/about.md b/content/about.md index ad81a14..045356e 100644 --- a/content/about.md +++ b/content/about.md @@ -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]. diff --git a/content/blog/building-my-own-ssg.md b/content/blog/building-my-own-ssg.md index 2d53eec..4fe6a25 100644 --- a/content/blog/building-my-own-ssg.md +++ b/content/blog/building-my-own-ssg.md @@ -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. diff --git a/content/git.md b/content/git.md new file mode 100644 index 0000000..ffa1cae --- /dev/null +++ b/content/git.md @@ -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] diff --git a/content/index.md b/content/index.md index 7bbc463..af7b1bd 100644 --- a/content/index.md +++ b/content/index.md @@ -1,5 +1,5 @@ --- -title: Home +title: ficd.sh show_title: false --- @@ -11,12 +11,13 @@ show_title: false
ficd.sh+