Shortcodes für Tabelle und Downloads eingebaut sowie eigenen Typ für feed gebaut
This commit is contained in:
parent
23649f935f
commit
f8c72825f0
9 changed files with 137 additions and 4 deletions
12
layouts/shortcodes/download.html
Normal file
12
layouts/shortcodes/download.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ $dataName := .Get "data" }}
|
||||
{{ $baseDir := path.Dir .Page.File }}
|
||||
|
||||
<ul>
|
||||
{{ range (index .Site.Data (split $dataName "/")) }}
|
||||
{{ $filename := (path.Join $baseDir .filename) }}
|
||||
{{ $file := os.Stat $filename }}
|
||||
{{ if $file }}
|
||||
<li><a href="{{ $filename | absURL }}">{{ .title }} ({{ div (div $file.Size 1024) 1024 }} MB)</a><br/>{{ .comment }}</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
Loading…
Add table
Add a link
Reference in a new issue