docs: Improve Traversing Local Files

This commit is contained in:
Mark D. Blackwell
2016-09-10 18:23:23 -04:00
committed by digitalcraftsman
parent b86a605bfb
commit 0d1e96701f
4 changed files with 50 additions and 46 deletions

View File

@@ -0,0 +1,13 @@
{{- $pathURL := .Get "pathURL" -}}
{{- $path := .Get "path" -}}
{{- $files := readDir $path -}}
<table>
<th>Size in bytes</th>
<th>Name</th>
{{- range $files }}
<tr>
<td>{{ .Size }}</td>
<td><a href="{{ $pathURL }}{{ .Name | relURL }}"> {{ .Name }}</a></td>
</tr>
{{- end }}
</table>