TylerHale/layouts/shortcodes/ReadDirectory.html
2024-01-31 15:06:47 -07:00

7 lines
212 B
HTML

<!-- layouts/shortcodes/ReadDirectory.html -->
{{ $dir := .Get "dir" }}
{{ range sort (readDir (delimit (slice "static" $dir) "/")) "Name" }}
<a href="/{{ $dir }}/{{ .Name }}">{{ .Name }}</a><br>
{{ end }}