hugo/docs/layouts/shortcodes/fileindex.html
2015-08-07 14:55:53 +02:00

16 lines
371 B
HTML

<table style="width=100%">
<th>Size in bytes</th>
<th>Name</th>
{{$dir := .Get "dir"}}
{{ $url := .Get "baseurl" }}
{{ $files := readDir $dir }}
{{ range $files }}
<tr>
<td>{{.Size}}</td>
<td>
<a href="{{$url}}{{.Name | urlize }}"> {{.Name}}</a>
</td>
</tr>
{{ end }}
</table>