directoryindex.html (332B)
1 {{- $pathURL := .Get "pathURL" -}} 2 {{- $path := .Get "path" -}} 3 {{- $files := readDir $path -}} 4 <table> 5 <th>Size in bytes</th> 6 <th>Name</th> 7 {{- range $files }} 8 <tr> 9 <td>{{ .Size }}</td> 10 <td><a href="{{ $pathURL }}{{ .Name | relURL }}" target="_blank"> {{ .Name }}</a></td> 11 </tr> 12 {{- end }} 13 </table>