Commit 7b13f228 authored by Ludovic Courtès's avatar Ludovic Courtès

Move URL helpers to (guix-hpc).

* haunt.scm (base-url, image-url, css-url, post-url): Move to...
* guix-hpc.scm: ... here.
parent a6e9f520
......@@ -5,11 +5,31 @@
(define-module (guix-hpc)
#:use-module (haunt page)
#:use-module (haunt site)
#:use-module (sxml simple)
#:use-module (haunt reader)
#:use-module (haunt reader commonmark)
#:export (static-pages))
#:export (base-url
image-url
css-url
post-url
static-pages))
(define (base-url . location)
(string-concatenate (cons "" location)))
(define (image-url location)
(base-url "static/images" location))
(define (css-url location)
(base-url "static/css" location))
(define (post-url post site)
"Return the URL of POST, a Haunt blog post, for SITE."
(base-url (site-post-slug site post) ".html"))
(define %cwd
(and=> (assq-ref (current-source-location) 'filename)
dirname))
......
......@@ -21,19 +21,6 @@
(srfi srfi-19)
(guix-hpc))
(define (base-url . location)
(string-concatenate (cons "" location)))
(define (image-url location)
(base-url "static/images" location))
(define (css-url location)
(base-url "static/css" location))
(define (post-url post site)
"Return the URL of POST, a Haunt blog post, for SITE."
(base-url (site-post-slug site post) ".html"))
(define (base-layout body)
`((doctype "html")
(html (@ (lang "en"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment