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:
-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>