add alt readme file (README.md)

This commit is contained in:
magmaus3 2023-07-12 14:22:18 +02:00
parent 8cc767be90
commit f26f06f197
Signed by: magmaus3
GPG key ID: 966755D3F4A9B251

View file

@ -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>