From e932a5ecc775cf73584f3b55b5b25185a7e2446a Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 13 Mar 2018 04:51:40 -0400 Subject: Improve Haunt project page. --- haunt.scm | 60 ++++++++++++++++++++++++------------------------- snippets/haunt-hello.md | 7 ++++++ snippets/haunt.scm | 9 +------- 3 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 snippets/haunt-hello.md diff --git a/haunt.scm b/haunt.scm index d3da8fa..989e7a8 100644 --- a/haunt.scm +++ b/haunt.scm @@ -50,7 +50,7 @@ `(link (@ (rel "stylesheet") (href ,(string-append "/css/" name ".css"))))) -(define (anchor content uri) +(define* (anchor content #:optional (uri content)) `(a (@ (href ,uri)) ,content)) (define %cc-by-sa-link @@ -186,6 +186,9 @@ free culture works available under the " ,%cc-by-sa-link " license.") (define (highlight-scheme code) `(pre (code ,(highlights->sxml (highlight lex-scheme code))))) +(define (raw-snippet code) + `(pre (code ,(if (string? code) code (read-string code))))) + ;; Markdown doesn't support video, so let's hack around that! Find ;; tags with a ".webm" source and substitute a