Add a shortcode to generate a Nethack logfile with data from the data directory

This commit is contained in:
Eryn Wells 2022-04-24 17:16:18 -07:00
parent 5419a15603
commit 8fb0e09e1b

View file

@ -1,6 +1,10 @@
{{ $nethack_logfile := $.Site.Data.nethack.logfile.nutmeg }}
{{ $nethack_data := $.Site.Data.nethack.logfile }}
{{ $logfile := slice }}
{{ range $nethack_data }}
{{ $logfile = $logfile | append .logfile }}
{{ end }}
<ol class="logfile">
{{ range sort $nethack_logfile "end_date" "desc" }}
{{ range sort $logfile "end_date" "desc" }}
{{ if ne .death.cause "quit" }}
<li class="logentry">
{{ partial "nethack/logentry.html" .}}