move the decision about where to render the filename into the template

This commit is contained in:
pho4cexa 2022-12-26 10:38:04 -08:00
parent e2487098c5
commit f1c42b4a6a
2 changed files with 21 additions and 19 deletions

View file

@ -42,6 +42,9 @@
<a href="{{ relative_root }}contributors.html">contributors</a>
</nav>
<hr />
{% if source_file %}
<p id="file-path">{{ source_file }}</p>
{% endif %}
{{ content|safe }}
<hr />
<footer>

View file

@ -174,8 +174,7 @@
`(pre ,(git-file->string source-file)))
(define (binary)
'(p "(Binary file)"))
`((p (@ id "file-path") ,source-file)
,(case (string->symbol extension)
(case (string->symbol extension)
((.md .markdown)
(handle-exceptions exn
(begin
@ -192,7 +191,7 @@
(else
(if (git-file-is-text? source-file)
(plaintext)
(binary))))))
(binary))))
(define (filelist->sxml source-files-list relative-root)
`((h1 "Files")