diff options
Diffstat (limited to 'docs/layouts/shortcodes/directoryindex.html')
-rw-r--r-- | docs/layouts/shortcodes/directoryindex.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/layouts/shortcodes/directoryindex.html b/docs/layouts/shortcodes/directoryindex.html new file mode 100644 index 000000000..37e7d3ad1 --- /dev/null +++ b/docs/layouts/shortcodes/directoryindex.html @@ -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 }}" target="_blank"> {{ .Name }}</a></td> + </tr> +{{- end }} +</table> |