summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--haunt.scm2
-rw-r--r--jakob/builder/blog.scm12
-rw-r--r--jakob/builder/index.scm82
-rw-r--r--jakob/theme.scm6
-rw-r--r--pages/about-site.org10
-rw-r--r--pages/about.org45
-rw-r--r--static/css/style.css2
7 files changed, 108 insertions, 51 deletions
diff --git a/haunt.scm b/haunt.scm
index 1c6c6f8..b9f8568 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -24,6 +24,7 @@
(jakob builder cookbook)
(jakob builder flat-pages)
(jakob builder htaccess)
+ (jakob builder index)
(jakob builder outbox)
(jakob reader html-prime)
(jakob reader org-mode-prime)
@@ -50,6 +51,7 @@
#:readers (list html-reader-prime org-mode-reader-prime sxml-reader)
#:builders
(list (atom-feed #:max-entries 1024)
+ (index)
(blog)
(blogroll)
(outbox)
diff --git a/jakob/builder/blog.scm b/jakob/builder/blog.scm
index c14cecf..b3f83a6 100644
--- a/jakob/builder/blog.scm
+++ b/jakob/builder/blog.scm
@@ -33,6 +33,8 @@
#:use-module (srfi srfi-26)
#:use-module (web uri)
#:export (post-uri
+ render-preview
+ sort-posts
blog))
;;; Commentary:
@@ -165,6 +167,12 @@
;; Subdirectory for post listings conditioned on post tags.
(define %tag-prefix (string-append %blog-prefix "/tag"))
+(define* (sort-posts posts #:keywords (reverse? #f))
+ (sort posts (lambda (a b)
+ ((if reverse? time>=? time<?)
+ (date->time-monotonic (post-date a))
+ (date->time-monotonic (post-date b))))))
+
(define (tags->pages posts)
"Return a list of pages for each tag used in POSTS, with said pages containing
only the posts tagged with that tag."
@@ -173,8 +181,8 @@ only the posts tagged with that tag."
(items->pages render-preview posts
(format #f "Posts tagged with \"~a\"" tag)
(tag-uri %tag-prefix tag ""))))
- (group-by-tag (sort posts (lambda (a b)
- (time<? (date->time-monotonic (post-date a)) (date->time-monotonic (post-date b))))) (cut post-ref <> 'tags))))
+ (group-by-tag (sort-posts posts #:reverse? #t)
+ (cut post-ref <> 'tags))))
(define (all-tags posts)
"Return a page summarizing tag usage across POSTS."
diff --git a/jakob/builder/index.scm b/jakob/builder/index.scm
new file mode 100644
index 0000000..6706f35
--- /dev/null
+++ b/jakob/builder/index.scm
@@ -0,0 +1,82 @@
+;;; Copyright © 2019 - 2026 Jakob L. Kreuze <zerodaysfordays@sdf.org>
+;;;
+;;; This program is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation; either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+(define-module (jakob builder index)
+ #:use-module (haunt artifact)
+ #:use-module (haunt html)
+ ;; #:use-module (haunt post)
+ ;; #:use-module (haunt utils)
+ ;; #:use-module (ice-9 format)
+ ;; #:use-module (ice-9 match)
+ #:use-module (jakob builder blog)
+ #:use-module (jakob theme)
+ #:use-module (jakob utils org-mode)
+ ;; #:use-module (jakob utils pagination)
+ ;; #:use-module (jakob utils sxml)
+ ;; #:use-module (jakob utils tags)
+ ;; #:use-module (jakob utils comments)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-11)
+ ;; #:use-module (srfi srfi-19)
+ ;; #:use-module (srfi srfi-26)
+ ;; #:use-module (web uri)
+ #:export (index)
+ )
+
+(define about-me-section
+ `(section (@ (id "about-me"))
+ (h2 (@ (class "section-header")) "About Me")
+ ,@(let-values (((_ sxml) (read-org-mode-file "pages/about.org")))
+ sxml)))
+
+(define about-site-section
+ `(section (@ (id "about-site"))
+ (h2 (@ (class "section-header")) "About This Website")
+ ,@(let-values (((_ sxml) (read-org-mode-file "pages/about-site.org")))
+ sxml)))
+
+(define selected-works-section
+ `(section (@ (id "selected-works"))
+ (h2 (@ (class "section-header")) "Selected Works")
+ (p "Click a thumbnail to view project details.")
+ (div (@ (class "project-grid") (role "list"))
+ ,(map (lambda (i)
+ `(a (@ (class "project-thumb") (role "listitem") (href "#"))
+ ,(format #f "[ PROJECT ~a ]" i)))
+ (iota 6)))))
+
+(define (posts-section posts)
+ `((h2 (@ (class "section-header")) "Recent Articles")
+ ,@(map render-preview posts)))
+
+(define (index)
+ "Return a Haunt build procedure to create an index page."
+ (lambda (site posts)
+ `(,(serialized-artifact "index.html"
+ (theme ;; #:title (post-ref post 'title)
+ ;; #:description (description-from-post post)
+ ;; #:keywords (post-ref post 'tags)
+ ;; #:meta (if (not (eof-object? meta-tags)) meta-tags '())
+ ;; #:scripts (if (not (eof-object? scripts)) scripts '())
+ #:content `(,about-me-section
+ (hr (@ (aria-hidden "true")))
+ ,(posts-section (take (sort-posts posts) 3))
+ (hr (@ (aria-hidden "true")))
+ ,selected-works-section
+ (hr (@ (aria-hidden "true")))
+ ,about-site-section
+ ))
+ sxml->html))))
diff --git a/jakob/theme.scm b/jakob/theme.scm
index 439b066..512df70 100644
--- a/jakob/theme.scm
+++ b/jakob/theme.scm
@@ -140,10 +140,10 @@
`(footer (@ (class "site-footer"))
(img (@ (src "/static/image/cc-by-sa-4.0.png")
(alt "Creative Commons BY-SA 4.0")))
- "©"
+ "© "
(time (@ (datetime "2015")) "2015")
" - "
- (time (@ (datetime ,year)) ,year)/
+ (time (@ (datetime ,year)) ,year)
" Jakob L. Kreuze")))
(define* (theme #:key
@@ -161,7 +161,7 @@
(head
,(if (null? title)
- `(title %title)
+ `(title ,%title)
`(title ,(string-join (list title %title) " :: ")))
(meta (@ (charset "utf-8")))
diff --git a/pages/about-site.org b/pages/about-site.org
new file mode 100644
index 0000000..55475f3
--- /dev/null
+++ b/pages/about-site.org
@@ -0,0 +1,10 @@
+#+TITLE: About Site
+#+OPTIONS: num:nil toc:nil
+
+This is my personal website for showcasing the things I make. Currently, that is long-form writing in the form of blog posts.
+
+The website is built using the [[https://dthompson.us/projects/haunt.html][Haunt]] [[https://en.wikipedia.org/wiki/Static_site_generator][static site generator]], but features some dynamic components that use Guile's =(http server)= module. The source code is available on [[https://git.sr.ht/~jakob/blog][Sourcehut]]. It started in 2015 as [[https://tsar-fox.com][tsar-fox.com]] and was written in [[https://web.archive.org/web/20161229222910/http://jakob.space/][Python]] using the [[https://en.wikipedia.org/wiki/Flask_(web_framework)][Flask]] web framework. In late 2018, I dropped that code base and began using the [[https://gohugo.io/][Hugo]] static site generator until mid 2019 when I began using Haunt. The [[https://web.archive.org/web/20161229222910/http://jakob.space/][Wayback Machine]] has several snapshots reaching back to December of 2016.
+
+I am not currently aware of any attempts to censor this website. Nonetheless, I maintain mirrors on [[http://jakobyallfrbd3herebyee7hug3hxs2ma6aflmmllk35d7dyiwp3adid.onion/][Tor]] and [[http://mtgqjdrqqpovyhx7tortulrnvakbptsi3w5yintmo6lqapdd3hnq.b32.i2p][I2P]] should you have difficulty accessing this website in your locality.
+
+I aim to be as transparent as possible about the use of [[https://en.wikipedia.org/wiki/Generative_artificial_intelligence][generative artificial intelligence]] on this website. Unless stated otherwise, all text and source code is written by myself.
diff --git a/pages/about.org b/pages/about.org
index 0ead4e1..5f5e388 100644
--- a/pages/about.org
+++ b/pages/about.org
@@ -1,53 +1,8 @@
#+TITLE: About
#+OPTIONS: num:nil toc:nil
-#+BEGIN_EXPORT html
-<div class="portrait">
- <img src="/static/image/portrait.png" alt="A portrait of myself, generated by a low-rank adaptation of SD-XL 1.0-base trained on many photographs." />
-</div>
-#+END_EXPORT
-
-* About Me
-
My name is Jakob Kreuze (/​ˈdʒeɪkəb ˈkɹuz/ and /​ˈjaːkɔp ˈkʁɔʏ̯tsə/ are both acceptable pronunciations), and I'm a 25 year-old cybersecurity professional living in the [[https://en.wikipedia.org/wiki/Virginia][Commonwealth of Virginia]]. Outside of work, I like to program and tinker with [[https://www.gnu.org/philosophy/free-sw.html][free software]], reverse engineer things, and hunt for security vulnerabilities. In the past, I've used the [[https://en.wikipedia.org/wiki/Hacker_culture#Definition][traditional definition]] of "hacker" to describe myself. These days, the [[https://en.wikipedia.org/wiki/Hacker#Security_related_hacking][vernacular meaning]] is a bit more accurate.
-On the softer side, I love cooking (and eating) delicious food, running long distances, lifting weights, and playing old video games.
-
The best way to contact me is by email at zerodaysfordays (at) ‌​‌‌‌​‌‌‍‌​‌‌​​​​‍‌​‌‌​​​‌‍‌‌​‌‌​​​‍‌​‌​‌​‌‌‍‌‌​‌‌‌‌‌‍‌​‌‌‌​​‌‍‌​‌​‌​‌​‍‌​‌‌‌‌​​‍‌​‌‌​‌​​‍‌​‌‌​‌‌​‍‌​‌‌​​​‌‍‌​‌‌‌​​​‍‌‌​‌‌‌‌‌‍‌​‌​‌‌​​‍‌​‌​‌‌‌‌‍‌​‌‌‌‌‌​‍‌​‌‌​​‌​‍‌‌​‌‌‌‌‌‍‌​‌‌​​‌​‍‌​‌‌‌​‌​sdf.org. My GPG key fingerprint is [[https://jakob.space/static/gpg.txt][6581 A4FC 404F 6434 AEA3 008C 45ED 4DC3 05BA DA33]]. I'm also on Signal as @incellebrite.666.
-I have a [[https://jakob.space/pages/about-complete.html][more detailed biography]] as well.
-
-** Elsewhere
-
-#+BEGIN_EXPORT html
-<table class="about-elsewhere">
- <tr>
- <td><img src="/static/image/about/pleroma.svg" alt="Pleroma" /></td>
- <td><a href="https://social.jakob.space/users/jakob">@jakob</a></td>
- </tr>
- <tr>
- <td><img src="/static/image/about/lobsters.svg" alt="Lobste.rs" /></td>
- <td><a href="https://lobste.rs/u/jakob">jakob</a></td>
- </tr>
- <tr>
- <td><img src="/static/image/about/sourcehut.svg" alt="Sourcehut" /></td>
- <td><a href="https://git.sr.ht/~jakob">~jakob</a></td>
- </tr>
-</table>
-#+END_EXPORT
-
In general, I opt for "jakob" as a handle, settling for "0daysfordays" or "zerodaysfordays" if "jakob" was taken. Not every account with one of those handles is mine!
-
-* About This Site
-
-This is my personal website for showcasing the things I make. Currently, that is long-form writing in the form of blog posts.
-
-The website is built using the [[https://dthompson.us/projects/haunt.html][Haunt]] [[https://en.wikipedia.org/wiki/Static_site_generator][static site generator]], but features some dynamic components that use Guile's =(http server)= module. The source code is available on [[https://git.sr.ht/~jakob/blog][Sourcehut]]. It started in 2015 as [[https://tsar-fox.com][tsar-fox.com]] and was written in [[https://web.archive.org/web/20161229222910/http://jakob.space/][Python]] using the [[https://en.wikipedia.org/wiki/Flask_(web_framework)][Flask]] web framework. In late 2018, I dropped that code base and began using the [[https://gohugo.io/][Hugo]] static site generator until mid 2019 when I began using Haunt. The [[https://web.archive.org/web/20161229222910/http://jakob.space/][Wayback Machine]] has several snapshots reaching back to December of 2016.
-
-I am not currently aware of any attempts to censor this website. Nonetheless, I maintain mirrors on [[http://jakobyallfrbd3herebyee7hug3hxs2ma6aflmmllk35d7dyiwp3adid.onion/][Tor]] and [[http://mtgqjdrqqpovyhx7tortulrnvakbptsi3w5yintmo6lqapdd3hnq.b32.i2p][I2P]] should you have difficulty accessing this website in your locality.
-
-I aim to be as transparent as possible about the use of [[https://en.wikipedia.org/wiki/Generative_artificial_intelligence][generative artificial intelligence]] on this website. Unless stated otherwise, all text and source code is written by myself.
-
-** Symbology
-
-The icon used on this website is a naval trident to symbolize strength and power. It was traced from [[https://commons.wikimedia.org/wiki/File:Heraldic_Trident.svg][File:Heraldic Trident.svg]] (CC BY-SA 4.0). Previously, I had used an archaic [[https://en.wikipedia.org/wiki/Lambda][Greek lambda]] in reference to its usage as notation in [[https://en.wikipedia.org/wiki/Programming_language_theory][programming language theory]]. I think a tool is a better representation of myself and my values at this point in time.
diff --git a/static/css/style.css b/static/css/style.css
index 9a0fbe8..ba671f1 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -9,7 +9,7 @@ body {
font-family: "Bitstream Vera Sans","DejaVu Sans",Verdana,Arial,sans-serif;
line-height: 1.4;
justify-content: center;
- background-image: url(background.png)
+ background-image: url(/static/image/background.png)
}
a {