Fix relative link resolution

Julien LepillerMon Mar 08 00:24:41+0100 2021

595ed5b

Fix relative link resolution

gitile/pages.scm

5656
5757
(define (file-content repo path ref repository-name)
5858
  (define (ensure-relative-link link)
59-
    "If link is relative, ensure it resolves relative to `path`"
59+
    "If link is relative, ensure it resolves relative to repo's base dir, in
60+
current ref."
6061
    (if (string->uri link)
6162
        link
62-
        (string-append "/" repository-name "/tree/" (or ref "-") "/" (dirname path)
63-
                       "/" link)))
63+
        (string-append "/" repository-name "/tree/" (or ref "-") "/" link)))
6464
6565
  (define check-links
6666
    (match-lambda