diff --git a/main.scm b/main.scm index e03da82..b65b899 100644 --- a/main.scm +++ b/main.scm @@ -52,24 +52,23 @@ (define DESCRIPTION (or (get-environment-variable "GIT_WWW_DESCRIPTION") "my git repositories")) (define H1 (or (get-environment-variable "GIT_WWW_H1") "git.example.com")) - -(define HTML-TEMPLATE - #< -{{title}} +#{TITLE} - + -

{{h1}}

-

{{repository-name}}

-

clone url: {{clone-url}}/{{repository-name}}

+

#{H1}

+

#{*repository-name*}

+

clone url: #{CLONE-URL}/#{*repository-name*}


-{{body-contents}} +#{body} string-block @@ -104,17 +103,6 @@ string-block (define (write-file file contents) (with-output-to-file file (lambda () (display contents)))) -(define (populate-html-template body-contents) - (string-translate* - HTML-TEMPLATE - `( - ("{{title}}" . ,TITLE) - ("{{description}}" . ,DESCRIPTION) - ("{{h1}}" . ,H1) - ("{{clone-url}}" . ,CLONE-URL) - ("{{repository-name}}" . ,*repository-name*) - ("{{body-contents}}" . ,body-contents)))) - (define (in-git-directory?) (if (equal? (call-with-input-pipe "git rev-parse --is-bare-repository 2> /dev/null" read-line) "true") #t