{{ $filename := .Get "file" }}
-{{ $file := path.Join (path.Dir $.Page.File) $filename }}
+{{ $file := path.Join .Page.Path $filename }}
{{ $ext := strings.TrimLeft "." (path.Ext $file) }}
{{ if strings.HasSuffix $file ".blade.php" }}
{{ $ext = "html" }}
{{ $md := printf "```%s\n%s\n```" $ext (readFile $file) }}
{{ $mdLen := len (split $md "\n") }}
-
<div class="hack-file-wrapper">
<div class="hack-file-block-filename">{{ $filename }}</div>
<div class="hack-file-block-type type-{{ $type }}">
- <a target="_blank" href="/{{ path.Join (path.Dir $.Page.File) $filename }}">Download</a> |
- <a target="_blank" href="/hacks/applying/#{{ if eq $type "logical"}}logical-theme-system{{ else if eq $type "visual"}}visual-theme-system{{ else if eq $type "head"}}head-html{{end}}" target="_blank">
+ <a target="_blank" href="{{ $file }}">Download</a> |
+ <a target="_blank" href="/hacks/applying/#{{ if eq $type "logical"}}logical-theme-system{{ else if eq $type "visual"}}visual-theme-system{{ else if eq $type "head"}}head-html{{end}}">
{{ if eq $type "logical"}}
Logical Theme System
{{ else if eq $type "visual"}}