From ce6913cc1615b3323596fe25a57455b07fe85957 Mon Sep 17 00:00:00 2001 From: Hanzei <16541325+hanzei@users.noreply.github.com> Date: Wed, 29 May 2019 17:28:58 +0200 Subject: Fix blog section on windows (#152) --- layouts/index.html | 4 ++-- layouts/partials/nav.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'layouts') diff --git a/layouts/index.html b/layouts/index.html index c324436..4a2dfca 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -56,10 +56,10 @@ {{ range sort $pages "Params.weight" }} {{ if ne .Name "contact.md" }} {{ if .File }} - {{ if eq .File.Dir "projects/" }} + {{ if eq (os.Stat .File.Dir).Name "projects" }} {{ partial "home/projects.html" . }} - {{ else if eq .File.Dir "blog/" }} + {{ else if eq (os.Stat .File.Dir).Name "blog" }} {{ partial "home/blog.html" . }} {{ else }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 96c841f..58b5e3e 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -53,7 +53,7 @@ {{ range sort $pages "Params.weight" }} {{ if ne .Name "contact.md" }} - {{ if eq .File.Dir "projects/" }} + {{ if eq (os.Stat .File.Dir).Name "projects" }} {{ if $isHome }} {{ .Title }} @@ -69,7 +69,7 @@ {{ end }} {{ end }} - {{ else if eq .File.Dir "blog/" }} + {{ else if eq (os.Stat .File.Dir).Name "blog" }} {{ if $isHome }} {{ .Title }} -- cgit v1.2.3