Include
Arrr! Pirrrates
Fello' pirrates, be awarrre some stuff may not work fer us in this trrranslat'n. Like table of rrramblings, see'ng Merrrmaids, do'ng math or chemistrrry and stuff.
Th' include
shorrrtcode includes other files from yer project inside o' th' current plank.
Usage
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' use positional aswell or also call this shorrrtcode from yer own partials.
{{% include file="shortcodes/INCLUDE_ME.md" %}}
{{% include "shortcodes/INCLUDE_ME.md" %}}
{{ partial "shortcodes/include .html" (dict
"context" .
"file" "shortcodes/INCLUDE_ME.md"
)}}
Th' included files can even contain Marrrkdown an' will be taken into account when generat'n th' t'ble o' contents.
Parameter
Name | Posit'n | Default | Notes |
---|---|---|---|
file | 1 | <empty> | Th' path t' th' file t' be included. Path resolut'n adheres t'
Hugo’s build-in readFile funct'n
|
hidefirsthead'n | 2 | false |
When true an' th' included file contains head'ns, th' first head'n will be hidden. This comes 'n handy, eg. if ye include otherwise standalone Marrrkdown files. |
Examples
Arbitrary Rrrambl'n
{{% include "shortcodes/INCLUDE_ME.md" %}}
Ye can add standard markdown rules:
- multiple paragraphs
- bullet point lists
- emphasized, bold an' even bold emphasized text
- links
- etc.
...and even source code
th' possibilities be endless (almost - includ'n other shorrrtcodes may or may not work) (almost - includ'n other shorrrtcodes may or may not work)