mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
fix: build fails on Windows: "Error: Could not find author page at..."
Caused due to Windows backslashes in path when extracting username from folder name. Fix #1068
This commit is contained in:
1 parent
8857bffa20
commit
71f0959b9e
1 file changed
+2
-2
@@ -15,8 +15,8 @@
|
||||
{{/* Show the About widget if an account exists for this user. */}}
|
||||
{{ if .File }}
|
||||
{{ $widget := "widgets/about.html" }}
|
||||
{{ $slug := delimit (last 1 (split (trim .File.Dir "/") "/")) "" }}{{/* Alternatively, use `index .Params.authors 0` */}}
|
||||
{{ $params := dict "root" $ "page" . "author" $slug }}
|
||||
{{ $username := (path.Base (path.Split .Path).Dir) }}{{/* Alternatively, use `index .Params.authors 0` */}}
|
||||
{{ $params := dict "root" $ "page" . "author" $username }}
|
||||
{{ partial $widget $params }}
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in new issue
Block a user