TylerHale/layouts/shortcodes/ReadDirectory.html

8 lines
212 B
HTML
Raw Permalink Normal View History

2024-01-31 15:06:47 -07:00
<!-- layouts/shortcodes/ReadDirectory.html -->
{{ $dir := .Get "dir" }}
{{ range sort (readDir (delimit (slice "static" $dir) "/")) "Name" }}
<a href="/{{ $dir }}/{{ .Name }}">{{ .Name }}</a><br>
{{ end }}