-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
set uglyurls = true in /config/_default/config.toml
file : /themes/zzodoc/layouts/partials/main/sections/list-menu.html
code :
{{ $root := .root }}
{{ $ctx := .ctx }}
{{ $depth := .depth }}
<!-- Before: http://localhost:1313/zdoc/gettingstarted/quickstart/ -->
<!-- Now : http://localhost:1313/zdoc/gettingstarted/quickstart.html -->
{{ $currentURL := $root.Permalink }}
{{ $sectionName1 := index (last 1 (split (delimit (split $ctx.Permalink "/") "," "") ",")) 0 }}
{{ $sectionName2 := index (last 2 (split (delimit (split $currentURL "/") "," "") ",")) 0 }}
<!-- $active -->
{{ $active := in $currentURL $ctx.Permalink }}
{{ $active = or $active (eq $sectionName1 $sectionName2) }}
{{ $active = or $active (in $currentURL $sectionName1) }}
EDIT THIS PAGE also has this problem. Can you help? thanks.
Metadata
Metadata
Assignees
Labels
No labels