mirror of https://github.com/crossplane/docs.git
Auto-generate child page indexes
This way when folks browse to the index pages they'll see an auto-generated list of child pages. Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
parent
d71867d6fc
commit
789826fc13
|
@ -3,3 +3,5 @@ title: Composition
|
|||
weight: 51
|
||||
description: Understand Crossplane's core components
|
||||
---
|
||||
|
||||
{{< auto-index >}}
|
||||
|
|
|
@ -4,3 +4,4 @@ weight: 40
|
|||
description: Get started with Crossplane.
|
||||
---
|
||||
|
||||
{{< auto-index >}}
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
title: Guides
|
||||
weight: 100
|
||||
description: Crossplane integrations and detailed examples.
|
||||
---
|
||||
---
|
||||
|
||||
{{< auto-index >}}
|
|
@ -3,3 +3,5 @@ title: Managed Resources
|
|||
weight: 52
|
||||
description: Understand Crossplane's managed resources and selective activation
|
||||
---
|
||||
|
||||
{{< auto-index >}}
|
|
@ -5,3 +5,5 @@ state: alpha
|
|||
alphaVersion: 2.0
|
||||
description: Understand Crossplane's Operations feature
|
||||
---
|
||||
|
||||
{{< auto-index >}}
|
|
@ -3,3 +3,5 @@ title: Packages
|
|||
weight: 53
|
||||
description: Understand Crossplane's core components
|
||||
---
|
||||
|
||||
{{< auto-index >}}
|
|
@ -0,0 +1,14 @@
|
|||
{{/*
|
||||
Auto-generates an index page with links to child pages, ordered by weight.
|
||||
Usage: {{ partial "auto-index" . }}
|
||||
*/}}
|
||||
{{ if .RegularPages }}
|
||||
<div class="auto-index">
|
||||
<p>Topics in this section:</p>
|
||||
<ul>
|
||||
{{ range .RegularPages.ByWeight }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Params.description }} - {{ .Params.description }}{{ end }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,5 @@
|
|||
{{/*
|
||||
Shortcode to auto-generate an index of child pages.
|
||||
Usage: {{< auto-index >}}
|
||||
*/}}
|
||||
{{ partial "auto-index" .Page }}
|
Loading…
Reference in New Issue