Add Lotusdocs theme
This commit is contained in:
24
themes/lotusdocs/layouts/index.html
Normal file
24
themes/lotusdocs/layouts/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{ define "main" }}
|
||||
{{ $landingData := .Site.Data.landing }}
|
||||
{{ $map := newScratch }}
|
||||
|
||||
{{ range $key, $value := $landingData }}
|
||||
{{ $sectionTitle := (index $key) }}
|
||||
{{ $weight := string ($value.weight) }}
|
||||
{{ $template := string (replaceRE `( |-{1,})` "_" $value.template) }}
|
||||
{{ with and $template $weight }}
|
||||
{{ $map.SetInMap "wgtTpl" $sectionTitle (dict
|
||||
"weight" $weight
|
||||
"template" $template
|
||||
"sectionTitle" $sectionTitle
|
||||
)}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range sort ($map.Get "wgtTpl") ".weight" }}
|
||||
{{ $.Scratch.Set "sectionTitle" .sectionTitle }}
|
||||
{{ $path := printf "landing/%s.html" .template }}
|
||||
{{ partial $path $.Page }}
|
||||
{{ end }}
|
||||
{{/* printf "%s" (sort ($map.Get "wgtTpl") ".weight" ) */}}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user