From 3c3867f83a4ee88f36d2bd6d47ce7aef5c5192f7 Mon Sep 17 00:00:00 2001 From: Zhang Liang Date: Tue, 10 Apr 2018 11:32:49 +0800 Subject: [PATCH] Add one shortcode to display directory files --- layouts/shortcodes/directoryindex.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 layouts/shortcodes/directoryindex.html diff --git a/layouts/shortcodes/directoryindex.html b/layouts/shortcodes/directoryindex.html new file mode 100644 index 0000000..a1c9b7e --- /dev/null +++ b/layouts/shortcodes/directoryindex.html @@ -0,0 +1,13 @@ +{{- $pathURL := .Get "pathURL" -}} +{{- $path := .Get "path" -}} +{{- $files := readDir $path -}} + + + +{{- range $files }} + + + + +{{- end }} +
文件大小(字节)文件名称
{{ .Size }} {{ .Name }}