From 0abc3b9c0d931715a31ae19006a0fbbe97066dba Mon Sep 17 00:00:00 2001 From: Denys Nykula Date: Thu, 11 Jan 2024 17:05:42 +0200 Subject: builder: atom: Add scheme to self-link. Planet Scheme uses the URL in the sidebar. A href without a scheme is considered a relative path. Probably that's why I get a 404 when I click Spritely Institute. --- haunt/builder/atom.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/haunt/builder/atom.scm b/haunt/builder/atom.scm index cc35b78..9a015b2 100644 --- a/haunt/builder/atom.scm +++ b/haunt/builder/atom.scm @@ -197,10 +197,12 @@ the blog's prefix and post prefix." (id ,uri) (subtitle ,subtitle) (updated ,(date->string* (current-date))) - (link (@ (href ,(string-append (site-domain site) - "/" file-name)) - (rel "self"))) - (link (@ (href ,(site-domain site)))) + (link (@ (href ,uri) (rel "self"))) + (link (@ (href + ,(uri->string + (build-uri + (site-scheme site) + #:host (site-domain site)))))) ,@(map (cut post->atom-entry site <> #:blog-prefix blog-prefix) (take-up-to max-entries (filter posts)))) -- cgit v1.2.3