distinguish between repo name and repo path
This commit is contained in:
parent
f1c42b4a6a
commit
57fcccc276
2 changed files with 12 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
|||
<body>
|
||||
<h1>git.example.com</h1>
|
||||
<h2>{{ repository_name }}</h2>
|
||||
<p>clone url: git://git.example.com/{{ repository_name }}</p>
|
||||
<p>clone url: git://git.example.com/{{ repository_path }}</p>
|
||||
<nav>
|
||||
{% if readme_file %}
|
||||
<a href="{{ relative_root }}{{ readme_file }}.html">about</a>
|
||||
|
|
12
main.scm
12
main.scm
|
@ -291,7 +291,17 @@
|
|||
;; the repository name, which we detect from the output directory
|
||||
;; name. TODO: more heuristics if this doesn't work well
|
||||
(repository_name
|
||||
. ,(pathname-strip-directory (string-chomp html-repo-path "/")))
|
||||
. ,(->
|
||||
html-repo-path
|
||||
(string-chomp "/")
|
||||
(string-chomp ".git")
|
||||
(pathname-strip-directory)))
|
||||
;; the path from the URL root to the repository
|
||||
(repository_path
|
||||
. ,(->
|
||||
html-repo-path
|
||||
(string-chomp "/")
|
||||
(pathname-strip-directory)))
|
||||
;; the first README file found, if any.
|
||||
(readme_file
|
||||
. ,(find (cut member <> source-files-list)
|
||||
|
|
Loading…
Reference in a new issue