diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index acbf9f5f..6d0654d9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -38,8 +38,11 @@ {{ $p := . }} + {{ $basePath := path.Clean (urls.Parse .Site.BaseURL).Path }} {{ range .Site.Menus.main }} - {{ $active := or (and (eq .URL `/`) (eq $p.RelPermalink `/`)) (and (ne .URL `/`) (hasPrefix $p.RelPermalink .URL)) }} + {{ $pagePath := strings.TrimPrefix $basePath $p.RelPermalink }} + {{ $menuPath := strings.TrimPrefix $basePath .URL }} + {{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }} {{ .Name }} {{ end }} diff --git a/layouts/home.html b/layouts/home.html index 8c5422e3..f4852518 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -13,7 +13,7 @@ {{ end }} - + @@ -24,7 +24,7 @@ {{ .Params.blurb | markdownify }} - +
{{ .Params.blurb | markdownify }}