add alt readme file (README.md)
This commit is contained in:
parent
8cc767be90
commit
f26f06f197
1 changed files with 6 additions and 0 deletions
|
@ -83,11 +83,17 @@
|
|||
</div>
|
||||
{{if (not .Req.URL.Query.embed)}}
|
||||
{{ $readmeFilePath := list (placeholder "http.request.uri.path") "README" | join ""}}
|
||||
{{ $altReadmeFilePath := list (placeholder "http.request.uri.path") "README.md" | join ""}}
|
||||
{{if (fileExists $readmeFilePath )}}
|
||||
<div class="readmeFile">
|
||||
<div class="readmeHeader">README</div>
|
||||
{{markdown (include $readmeFilePath)}}
|
||||
</div>
|
||||
{{- else if (fileExists $altReadmeFilePath)}}
|
||||
<div class="readmeFile">
|
||||
<div class="readmeHeader">README</div>
|
||||
{{markdown (include $altReadmeFilePath)}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</main>
|
||||
|
|
Loading…
Reference in a new issue