Include
Arrr! Pirrrates
Fello' pirrates, be awarrre some featurrres may not work fer us in this trrranslat'n. Like table of rrramblings, some Merrrmaids and stuff.
Th' include
shorrrtcode includes other files from yer project inside o' th' current plank.
Usage
While th' examples be us'n named parameter ye be free t' use positional aswell.
{{% include file="shortcodes/INCLUDE_ME.md" %}}
{{% include "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 |
showfirsthead'n | 2 | true |
When false 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
Arbitray 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' possiblities be endless (almost - includ'n other shorrrtcodes may or may not work) (almost - includ'n other shorrrtcodes may or may not work)