v0.3.0
* Getting environment variables and passwords from Vault (not tested yet) * Vault configuration to config (not tested yet) * Ability to run scripts from file on local machine on the remote host * Ability to get ouput in the notification of a list for individual commands or all commands * Make SSH connections close after all commands have been run; reuse previous connections if needed
This commit is contained in:
86
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/_index.en.md
vendored
Normal file
86
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/_index.en.md
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
description = "List the child pages of a page"
|
||||
title = "Children"
|
||||
+++
|
||||
|
||||
The `children` shortcode lists the child pages of the current page and its descendants.
|
||||
|
||||
{{% children sort="weight" %}}
|
||||
|
||||
## Usage
|
||||
|
||||
While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.
|
||||
|
||||
{{< tabs groupId="shortcode-parameter">}}
|
||||
{{% tab title="shortcode" %}}
|
||||
|
||||
````go
|
||||
{{%/* children sort="weight" */%}}
|
||||
````
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab title="partial" %}}
|
||||
|
||||
````go
|
||||
{{ partial "shortcodes/children.html" (dict
|
||||
"context" .
|
||||
"sort" "weight"
|
||||
)}}
|
||||
````
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
### Parameter
|
||||
|
||||
| Name | Default | Notes |
|
||||
|:-------------------|:------------------|:------------|
|
||||
| **containerstyle** | `ul` | Choose the style used to group all children. It could be any HTML tag name. |
|
||||
| **style** | `li` | Choose the style used to display each descendant. It could be any HTML tag name. |
|
||||
| **showhidden** | `false` | When `true`, child pages hidden from the menu will be displayed as well. |
|
||||
| **description** | `false` | When `true` shows a short text under each page in the list. When no description or summary exists for the page, the first 70 words of the content is taken - [read more info about summaries on gohugo.io](https://gohugo.io/content/summaries/). |
|
||||
| **depth** | `1` | The depth of descendants to display. For example, if the value is `2`, the shortcode will display two levels of child pages. To get all descendants, set this value to a high number eg. `999`. |
|
||||
| **sort** | see notes | The sort order of the displayed list.<br><br>If not set it is sorted by the [`ordersectionsby`]({{% relref "basics/configuration#global-site-parameters" %}}) setting of the site and the pages frontmatter<br><br>- `weight`: to sort on menu order<br>- `title`: to sort alphabetically on menu label. |
|
||||
|
||||
## Examples
|
||||
|
||||
### All Default
|
||||
|
||||
````go
|
||||
{{%/* children */%}}
|
||||
````
|
||||
|
||||
{{% children %}}
|
||||
|
||||
### With Description
|
||||
|
||||
````go
|
||||
{{%/* children description="true" */%}}
|
||||
````
|
||||
|
||||
{{%children description="true" %}}
|
||||
|
||||
### Infinite Depth and Hidden Pages
|
||||
|
||||
````go
|
||||
{{%/* children depth="999" showhidden="true" */%}}
|
||||
````
|
||||
|
||||
{{% children depth="999" showhidden="true" %}}
|
||||
|
||||
### Heading Styles for Container and Elements
|
||||
|
||||
````go
|
||||
{{%/* children containerstyle="div" style="h2" depth="3" description="true" */%}}
|
||||
````
|
||||
|
||||
{{% children containerstyle="div" style="h2" depth="3" description="true" %}}
|
||||
|
||||
### Divs for Group and Element Styles
|
||||
|
||||
````go
|
||||
{{%/* children containerstyle="div" style="div" depth="3" */%}}
|
||||
````
|
||||
|
||||
{{% children containerstyle="div" style="div" depth="3" %}}
|
6
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/_index.pir.md
vendored
Normal file
6
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/_index.pir.md
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
descrption = "List th' child planks on a plank"
|
||||
title = "Children"
|
||||
+++
|
||||
{{< piratify >}}
|
13
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-1/_index.en.md
vendored
Normal file
13
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-1/_index.en.md
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 1"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
This is a demo child page.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,8 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 1"
|
||||
weight = 10
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,12 @@
|
||||
+++
|
||||
alwaysopen = true
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 1-1"
|
||||
+++
|
||||
|
||||
This is a demo child page with a hidden child. You can still access the hidden child [directly]({{% relref "shortcodes/children/children-1/children-1-1/children-1-1-1" %}}) or via the search.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
alwaysopen = true
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 1-1"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,12 @@
|
||||
+++
|
||||
description = "This is a hidden demo child page"
|
||||
hidden = true
|
||||
tags = ["children", "hidden"]
|
||||
title = "page 1-1-1 (hidden)"
|
||||
+++
|
||||
|
||||
This is a **hidden** demo child page. This page and all its children are hidden in the menu, arrow navigation and children shortcode as long as you aren't viewing this page or its children directly.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
descrption = "This be a hidden demo child plank"
|
||||
hidden = true
|
||||
tags = ["children", "hidden"]
|
||||
title = "plank 1-1-1 (hidden)"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,11 @@
|
||||
+++
|
||||
description = "This is a non-hidden demo child page of a hidden parent page"
|
||||
tags = ["children", "hidden"]
|
||||
title = "page 1-1-1-1"
|
||||
+++
|
||||
|
||||
This is a **non-hidden** demo child page of a hidden parent page with a hidden child. You can still access the hidden child [directly]({{% relref "shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1" %}}) or via the search.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a non-hidden demo child plank o' a hidden parrrent plank"
|
||||
tags = ["children", "hidden"]
|
||||
title = "plank 1-1-1-1"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,12 @@
|
||||
+++
|
||||
description = "This is a hidden demo child page"
|
||||
hidden = true
|
||||
tags = ["children", "hidden"]
|
||||
title = "page 1-1-1-1-1 (hidden)"
|
||||
+++
|
||||
|
||||
This is a **hidden** demo child page. This page and all its children are hidden in the menu, arrow navigation and children shortcode as long as you aren't viewing this page or its children directly.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
descrption = "This be a hidden demo child plank"
|
||||
hidden = true
|
||||
tags = ["children", "hidden"]
|
||||
title = "plank 1-1-1-1-1 (hidden)"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
description = "This is a non-hidden demo child page of a hidden parent page"
|
||||
tags = ["children", "hidden"]
|
||||
title = "page 1-1-1-1-1-1"
|
||||
+++
|
||||
|
||||
This is a **non-hidden** demo child page of a hidden parent page.
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a non-hidden demo child plank on a hidden parrrent plank"
|
||||
tags = ["children", "hidden"]
|
||||
title = "plank 1-1-1-1-1-1"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,11 @@
|
||||
+++
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 1-1-2"
|
||||
+++
|
||||
|
||||
This is a plain demo child page.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 1-1-2"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 1-1-2-1"
|
||||
+++
|
||||
|
||||
This is a plain demo child page.
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 1-1-2-1"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 1-1-2-2"
|
||||
+++
|
||||
|
||||
This is a plain demo child page.
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 1-1-2-2"
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 1-1-3"
|
||||
+++
|
||||
|
||||
This is a plain demo child page.
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 1-1-3"
|
||||
+++
|
||||
{{< piratify >}}
|
10
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-2/_index.en.md
vendored
Normal file
10
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-2/_index.en.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 2"
|
||||
weight = 20
|
||||
+++
|
||||
|
||||
This is a demo child page with no description.
|
||||
|
||||
So its content is used as description.
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 2"
|
||||
weight = 20
|
||||
+++
|
||||
{{< piratify >}}
|
13
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-3/_index.en.md
vendored
Normal file
13
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-3/_index.en.md
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
description = "This is a demo child page"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 3"
|
||||
weight = 30
|
||||
+++
|
||||
|
||||
This is a demo child page.
|
||||
|
||||
## Subpages of this page
|
||||
|
||||
{{% children showhidden="true" %}}
|
@ -0,0 +1,8 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
descrption = "This be a demo child plank"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 3"
|
||||
weight = 30
|
||||
+++
|
||||
{{< piratify >}}
|
@ -0,0 +1,7 @@
|
||||
+++
|
||||
description = "This is a plain page test nested in a parent"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "page 3-1"
|
||||
+++
|
||||
|
||||
This is a plain demo child page.
|
@ -0,0 +1,6 @@
|
||||
+++
|
||||
descrption = "This be a plain plank test nested 'n a parrrent"
|
||||
tags = ["children", "non-hidden"]
|
||||
title = "plank 3-1"
|
||||
+++
|
||||
{{< piratify >}}
|
10
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-4/_index.en.md
vendored
Normal file
10
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/children-4/_index.en.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
description = "This is a hidden demo child page"
|
||||
hidden = true
|
||||
tags = ["children", "hidden"]
|
||||
title = "page 4 (hidden)"
|
||||
weight = 40
|
||||
+++
|
||||
|
||||
This is a **hidden** demo child page. This page and all its children are hidden in the menu, arrow navigation and children shortcode as long as you aren't viewing this page or its children directly.
|
@ -0,0 +1,9 @@
|
||||
+++
|
||||
alwaysopen = false
|
||||
descrption = "This be a hidden demo child plank"
|
||||
hidden = true
|
||||
tags = ["children", "hidden"]
|
||||
title = "plank 4 (hidden)"
|
||||
weight = 40
|
||||
+++
|
||||
{{< piratify >}}
|
10
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/test.en.md
vendored
Normal file
10
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/test.en.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
description: |
|
||||
This is a plain page test, and the beginning of a YAML multiline description...
|
||||
tags:
|
||||
- "Children"
|
||||
title: "page X"
|
||||
weight: 1
|
||||
---
|
||||
|
||||
This is a plain demo child page.
|
9
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/test.pir.md
vendored
Normal file
9
docs/themes/hugo-theme-relearn/exampleSite/content/shortcodes/children/test.pir.md
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
description: |
|
||||
This be a plain plank test, an' th' beginn'n o' a YAML multiline description…
|
||||
tags:
|
||||
- "Children"
|
||||
title: "plank X"
|
||||
weight: 1
|
||||
---
|
||||
{{< piratify >}}
|
Reference in New Issue
Block a user