From d07052efd5348bb8dd96b0ec236eb3a94d434c07 Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Mon, 14 Dec 2020 03:46:49 +0100 Subject: [PATCH] ADD_ANNEX or anything else not in triad hierarchy --- layouts/partials/header.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index c45676e..4eb37a3 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,5 +1,10 @@ {{ $s := partialCached "scratch.html" . }} +{{ $currentDir := "" }} +{{ with .File }} + {{ $currentDir = .Dir }} +{{ end }} + {{ $currentFile := (printf "/%s" .File) }} {{ $scratch := $s.Get $currentFile }} @@ -27,6 +32,7 @@ {{ with $scratch.core }}ADD_{{ index . 0 | upper }}{{ end }} {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} + {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} PUBLISH ?