Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/layouts/shortcodes/directoryindex.html')
-rw-r--r--docs/layouts/shortcodes/directoryindex.html13
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>