From 07e73e408386811882e5fada3073e72cbb2cad27 Mon Sep 17 00:00:00 2001 From: m455 Date: Wed, 7 Dec 2022 22:31:58 -0500 Subject: [PATCH] Changed absolute image paths back to relative paths, since everything else is using a relative path This works, because when you click a link to view a file source, the link takes you into the directory where the image is, because directories are recursively made in the web server directory to mimic the structure of the git repository, and so files with the same name don't conflict, because they'll be in a different directory. --- main.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.scm b/main.scm index 5ec152f..5a6eade 100755 --- a/main.scm +++ b/main.scm @@ -88,7 +88,7 @@ string-block (call-with-input-pipe read-lines) (string-intersperse "\n"))) -(define (display-source-html repository-name source-file) ;; src/main.scm +(define (display-source-html source-file) ;; src/main.scm (format #t "

~a

" source-file) (case (string->symbol (or (pathname-extension source-file) "no-extension")) ((md markdown) @@ -103,9 +103,9 @@ string-block (display "")) (markdown->html (git-file->string source-file)))) ((jpg jpeg png gif webp webm apng avif svgz ico) - (format #t "

" repository-name source-file)) + (format #t "

" (pathname-strip-directory repository-name) source-file)) ((svg) - (format #t "

" repository-name source-file) + (format #t "

" (pathname-strip-directory repository-name) source-file) (display "
")
      (display-escaped-html (git-file->string source-file))
      (display "
")) @@ -160,7 +160,7 @@ string-block (lambda (source-file) (write-with-template (string-append source-file ".html") - (lambda () (display-source-html repository-name source-file))) + (lambda () (display-source-html source-file))) (case (string->symbol (or (pathname-extension source-file) "")) ((jpg jpeg png gif webp webm svg apng avif svgz ico) (system (format "git show HEAD:~a > ~a"