move the decision about where to render the filename into the template
This commit is contained in:
parent
e2487098c5
commit
f1c42b4a6a
2 changed files with 21 additions and 19 deletions
|
@ -42,6 +42,9 @@
|
||||||
<a href="{{ relative_root }}contributors.html">contributors</a>
|
<a href="{{ relative_root }}contributors.html">contributors</a>
|
||||||
</nav>
|
</nav>
|
||||||
<hr />
|
<hr />
|
||||||
|
{% if source_file %}
|
||||||
|
<p id="file-path">{{ source_file }}</p>
|
||||||
|
{% endif %}
|
||||||
{{ content|safe }}
|
{{ content|safe }}
|
||||||
<hr />
|
<hr />
|
||||||
<footer>
|
<footer>
|
||||||
|
|
5
main.scm
5
main.scm
|
@ -174,8 +174,7 @@
|
||||||
`(pre ,(git-file->string source-file)))
|
`(pre ,(git-file->string source-file)))
|
||||||
(define (binary)
|
(define (binary)
|
||||||
'(p "(Binary file)"))
|
'(p "(Binary file)"))
|
||||||
`((p (@ id "file-path") ,source-file)
|
(case (string->symbol extension)
|
||||||
,(case (string->symbol extension)
|
|
||||||
((.md .markdown)
|
((.md .markdown)
|
||||||
(handle-exceptions exn
|
(handle-exceptions exn
|
||||||
(begin
|
(begin
|
||||||
|
@ -192,7 +191,7 @@
|
||||||
(else
|
(else
|
||||||
(if (git-file-is-text? source-file)
|
(if (git-file-is-text? source-file)
|
||||||
(plaintext)
|
(plaintext)
|
||||||
(binary))))))
|
(binary))))
|
||||||
|
|
||||||
(define (filelist->sxml source-files-list relative-root)
|
(define (filelist->sxml source-files-list relative-root)
|
||||||
`((h1 "Files")
|
`((h1 "Files")
|
||||||
|
|
Loading…
Reference in a new issue