added platform
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{{- /* Nested page list for sections with subsections. Expands only the branch containing the current page. */ -}}
|
||||
{{ $current := .current }}
|
||||
<ul>
|
||||
{{ range .pages.ByWeight }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}"{{ if eq $current . }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a>
|
||||
{{ if and .IsSection (or (eq $current .) ($current.IsDescendant .)) }}
|
||||
{{ with .Pages }}{{ partial "side-tree.html" (dict "pages" . "current" $current) }}{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
@@ -40,4 +40,10 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with site.GetPage "/platform" }}
|
||||
<div class="side-group">
|
||||
<a class="side-heading{{ if eq $current . }} is-current{{ end }}" href="{{ .RelPermalink }}"{{ if eq $current . }} aria-current="page"{{ end }}>{{ .Title }}</a>
|
||||
{{ partial "side-tree.html" (dict "pages" .Pages "current" $current) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</nav>
|
||||
|
||||
+5
-1
@@ -1,9 +1,13 @@
|
||||
{{- $items := slice -}}
|
||||
{{- range site.RegularPages -}}
|
||||
{{- $section := .CurrentSection.Title -}}
|
||||
{{- if and (eq .Section "platform") (ne .CurrentSection .FirstSection) -}}
|
||||
{{- $section = printf "%s · %s" .FirstSection.Title $section -}}
|
||||
{{- end -}}
|
||||
{{- $items = $items | append (dict
|
||||
"title" .Title
|
||||
"url" .RelPermalink
|
||||
"section" (cond (eq .Section "apps") (.Params.category | default "Applications") .CurrentSection.Title)
|
||||
"section" (cond (eq .Section "apps") (.Params.category | default "Applications") $section)
|
||||
"tagline" (.Params.tagline | default "")
|
||||
"replaces" (delimit (.Params.replaces | default slice) ", ")
|
||||
"headings" (delimit (findRE `(?m)^#{2,3} .+$` .RawContent) " " | replaceRE `#+ ` "")
|
||||
|
||||
Reference in New Issue
Block a user