avoid repeating the site url
authorAmin Bandali <bandali@gnu.org>
Sat, 30 Nov 2019 01:32:51 +0000 (20:32 -0500)
committerAmin Bandali <bandali@gnu.org>
Sat, 30 Nov 2019 05:52:27 +0000 (00:52 -0500)
haunt.scm

index db736a6..c51ecf8 100644 (file)
--- a/haunt.scm
+++ b/haunt.scm
              (ice-9 match)
              (srfi srfi-19))
 
              (ice-9 match)
              (srfi srfi-19))
 
+(define my-scheme 'https)
+(define my-domain "bandali.eu.org")
+(define my-url
+  (string-append (symbol->string my-scheme) "://" my-domain))
+
 (define (stylesheet name)
   `(link (@ (rel "stylesheet")
             (href ,(string-append "/" name ".css")))))
 (define (stylesheet name)
   `(link (@ (rel "stylesheet")
             (href ,(string-append "/" name ".css")))))
            " [ " ,(aa "pdf" "papers/modre2018-declarative.pdf") " | "
            ,(aa "bib" "papers/modre2018-declarative.bib") " ]"))
      (dd "Ali Abbassi, "
            " [ " ,(aa "pdf" "papers/modre2018-declarative.pdf") " | "
            ,(aa "bib" "papers/modre2018-declarative.bib") " ]"))
      (dd "Ali Abbassi, "
-         ,(aa "Amin Bandali" "https://bandali.eu.org") ", "
+         ,(aa "Amin Bandali" my-url) ", "
          ,(aa "Nancy A. Day" "https://cs.uwaterloo.ca/~nday/") ", "
          "Jose Serna"
          (br)
          ,(aa "Nancy A. Day" "https://cs.uwaterloo.ca/~nday/") ", "
          "Jose Serna"
          (br)
             " Research Conference,\n"
             "York University, Toronto, Canada, August 15, 2017")
        " ]"))
             " Research Conference,\n"
             "York University, Toronto, Canada, August 15, 2017")
        " ]"))
-     (dd ,(aa "Amin Bandali" "https://bandali.eu.org") ", "
+     (dd ,(aa "Amin Bandali" my-url) ", "
          ,(aa "Simon Hudon" "https://github.com/cipher1024") ", "
          ,(aa "Jonathan S. Ostroff"
               "http://www.cse.yorku.ca/~jonathan/")))
          ,(aa "Simon Hudon" "https://github.com/cipher1024") ", "
          ,(aa "Jonathan S. Ostroff"
               "http://www.cse.yorku.ca/~jonathan/")))
   (static-page
    "Licensing Information"
    "license.html"
   (static-page
    "Licensing Information"
    "license.html"
-   `((h1 "License information for bandali.eu.org")
+   `((h1 "License information for " ,my-domain)
      (p "I strongly believe in "
         ,(aa "free culture"
              "https://questioncopyright.org/what_is_free_culture")
      (p "I strongly believe in "
         ,(aa "free culture"
              "https://questioncopyright.org/what_is_free_culture")
       (li (del ,(aa "bandali0" "https://twitter.com/bandali0")
                " on Twitter"))))))
 
       (li (del ,(aa "bandali0" "https://twitter.com/bandali0")
                " on Twitter"))))))
 
-(define my-domain "bandali.eu.org")
-
 (site #:title "Amin Bandali"
 (site #:title "Amin Bandali"
+      ;; TODO: uncomment after new haunt release
+      ;; #:scheme my-scheme
       #:domain my-domain
       #:default-metadata
       '((author . "Amin Bandali")
       #:domain my-domain
       #:default-metadata
       '((author . "Amin Bandali")