|
@@ -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}}
|
|
|
|