Commit c0e611e3 authored by Ludovic Courtès's avatar Ludovic Courtès

Use 'base-url' everywhere.

This allows 'WEB_SITE_LOCAL=t' builds to work as expected.

* haunt.scm (base-url): Make 'location' a rest argument.
(image-url, css-url): Define in terms of 'base-url'.
(post-url): Remove 'string-append'.
parent 40200106
......@@ -21,18 +21,18 @@
(srfi srfi-19)
(define (base-url location)
(string-append "" location))
(define (base-url . location)
(string-concatenate (cons "" location)))
(define (image-url location)
(string-append "/static/images" location))
(base-url "static/images" location))
(define (css-url location)
(string-append "/static/css" location))
(base-url "static/css" location))
(define (post-url post site)
"Return the URL of POST, a Haunt blog post, for SITE."
(base-url (string-append "" (site-post-slug site post) ".html")))
(base-url (site-post-slug site post) ".html"))
(define (base-layout body)
`((doctype "html")
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