From d64826dc5d602dccb50cbdfd437aba445da16fe4 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Tue, 10 Sep 2024 08:38:35 -0600 Subject: [PATCH] add lsitfiels shortcode --- layouts/shortcodes/listfiles.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 layouts/shortcodes/listfiles.html diff --git a/layouts/shortcodes/listfiles.html b/layouts/shortcodes/listfiles.html new file mode 100644 index 0000000..97efdbe --- /dev/null +++ b/layouts/shortcodes/listfiles.html @@ -0,0 +1,12 @@ +{{ $path := .Get "path" }}{{ $files := readDir $path }} +
+ {{ range sort $files ".Name" "asc" }} + {{ if not .IsDir }} + {{ if ne .Name "index.md" }} + + {{ end }} + {{ end }} + {{ end }} +