{{ $_hugo_config := `{ "version": 1 }` }}
{{ $showhidden := .Get "showhidden"}}
{{ $style :=  .Get "style" | default "li" }}
{{ $depth :=  .Get "depth" | default 1 }}
{{ $startdepth := .Get "startdepth" | default 0 }}
{{ $withDescription :=  .Get "description" | default false }}
{{ $sortTerm :=  .Get "sort" | default "Weight" }}

<ul class="children children-{{$style}}">
	{{ .Scratch.Set "pages" .Page.Pages }}

	{{if .Page.IsHome}}
		<!-- Add pages that are in root dir -->
		{{ $rootPage := where .Page.Page