Andrew Woodlee
4b382bddd9
* 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
1.6 KiB
1.6 KiB
+++ description = "Displays content from other files" title = "Include" +++
The include
shortcode includes other files from your project inside of the current page.
Usage
While the examples are using shortcodes with named parameter you are free to use positional aswell or also call this shortcode from your own partials.
{{< tabs groupId="shortcode-parameter">}} {{% tab title="shortcode" %}}
{{%/* include file="shortcodes/INCLUDE_ME.md" */%}}
{{% /tab %}} {{% tab title="shortcode (positional)" %}}
{{%/* include "shortcodes/INCLUDE_ME.md" */%}}
{{% /tab %}} {{% tab title="partial" %}}
{{ partial "shortcodes/include .html" (dict
"context" .
"file" "shortcodes/INCLUDE_ME.md"
)}}
{{% /tab %}} {{< /tabs >}}
The included files can even contain Markdown and will be taken into account when generating the table of contents.
Parameter
Name | Position | Default | Notes |
---|---|---|---|
file | 1 | <empty> | The path to the file to be included. Path resolution adheres to Hugo's build-in readFile function |
hidefirstheading | 2 | false |
When true and the included file contains headings, the first heading will be hidden. This comes in handy, eg. if you include otherwise standalone Markdown files. |
Examples
Arbitrary Content
{{%/* include "shortcodes/INCLUDE_ME.md" */%}}
{{% include "shortcodes/INCLUDE_ME.md" %}}