Fix blog section on windows (#152)

This commit is contained in:
Hanzei 2019-05-29 17:28:58 +02:00 committed by GitHub
parent 46f2ab37d4
commit ce6913cc16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -56,10 +56,10 @@
{{ range sort $pages "Params.weight" }} {{ range sort $pages "Params.weight" }}
{{ if ne .Name "contact.md" }} {{ if ne .Name "contact.md" }}
{{ if .File }} {{ if .File }}
{{ if eq .File.Dir "projects/" }} {{ if eq (os.Stat .File.Dir).Name "projects" }}
<!-- Now for some cool projects --> <!-- Now for some cool projects -->
{{ partial "home/projects.html" . }} {{ 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 --> <!-- Let`s show some blog posts -->
{{ partial "home/blog.html" . }} {{ partial "home/blog.html" . }}
{{ else }} {{ else }}

View file

@ -53,7 +53,7 @@
{{ range sort $pages "Params.weight" }} {{ range sort $pages "Params.weight" }}
{{ if ne .Name "contact.md" }} {{ if ne .Name "contact.md" }}
{{ if eq .File.Dir "projects/" }} {{ if eq (os.Stat .File.Dir).Name "projects" }}
<!-- Now for some cool projects --> <!-- Now for some cool projects -->
{{ if $isHome }} {{ if $isHome }}
<a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a> <a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
@ -69,7 +69,7 @@
</a> </a>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ else if eq .File.Dir "blog/" }} {{ else if eq (os.Stat .File.Dir).Name "blog" }}
<!-- Let`s show some blog posts --> <!-- Let`s show some blog posts -->
{{ if $isHome }} {{ if $isHome }}
<a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a> <a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>