Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <16541325+hanzei@users.noreply.github.com>2019-05-29 18:28:58 +0300
committerGitHub <noreply@github.com>2019-05-29 18:28:58 +0300
commitce6913cc1615b3323596fe25a57455b07fe85957 (patch)
treed4e3cf1efd9e1305206968fa7b62159add54b750 /layouts
parent46f2ab37d40e3cc6887d9490e0768d2ef7cb345e (diff)
Fix blog section on windows (#152)
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.html4
-rw-r--r--layouts/partials/nav.html4
2 files changed, 4 insertions, 4 deletions
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" }}
<!-- Now for some cool projects -->
{{ partial "home/projects.html" . }}
- {{ else if eq .File.Dir "blog/" }}
+ {{ else if eq (os.Stat .File.Dir).Name "blog" }}
<!-- Let`s show some blog posts -->
{{ 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" }}
<!-- Now for some cool projects -->
{{ if $isHome }}
<a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
@@ -69,7 +69,7 @@
</a>
{{ end }}
{{ end }}
- {{ else if eq .File.Dir "blog/" }}
+ {{ else if eq (os.Stat .File.Dir).Name "blog" }}
<!-- Let`s show some blog posts -->
{{ if $isHome }}
<a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>