Explorar o código

fix(project): projects not listing child pages

Fix #800
George Cushen %!s(int64=6) %!d(string=hai) anos
pai
achega
4018752dc8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      layouts/project/single.html

+ 2 - 1
layouts/project/single.html

@@ -20,7 +20,8 @@
     {{ $project = .File.TranslationBaseName }}
     {{ end }}
     {{ if eq $project "index" }}{{/* Check if using dir-based page bundles. */}}
-    {{ $project = delimit (last 1 (split (substr .Dir 0 -1) "/")) "" }}
+    {{ $dir_sep := substr .Dir -1 1 }}
+    {{ $project = delimit (last 1 (split (substr .Dir 0 -1) $dir_sep)) "" }}
     {{ end }}
     {{ $project_path := .RelPermalink }}