Skip to content

Commit

Permalink
add lsitfiels shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Sep 10, 2024
1 parent d29fac6 commit d64826d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions layouts/shortcodes/listfiles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ $path := .Get "path" }}{{ $files := readDir $path }}
<div class="reportlist-container">
{{ range sort $files ".Name" "asc" }}
{{ if not .IsDir }}
{{ if ne .Name "index.md" }}
<div class="reportitem">
<a href="/{{ replace (replace $path "static/" "" ) "content/" ""}}{{ .Name }}">{{ .Name }}</a>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>

0 comments on commit d64826d

Please sign in to comment.