Attachments
Th' Attachments shorrrtcode displays a list o' files attached t' a plank.
Usage
Th' shortcurt lists files found 'n a specific folder. Currently, it support two implementat'ns fer planks
-
If yer plank be a Marrrkdown file, attachements must be placed 'n a folder named like yer plank an' end'n wit' .files.
- rambl'n
- _index.md
- plank.files
- attachment.pdf
- plank.md
- rambl'n
-
If yer plank be a folder, attachements must be placed 'n a nested ‘files’ folder.
- rambl'n
- _index.md
- plank
- index.md
- files
- attachment.pdf
- rambl'n
Be aware that if ye use a multilingual website, ye will need t' have as many folders as languages.
That’s all!
Parameters
Parameter | Default | Descript'n |
---|---|---|
title | “Attachments” | List’s title |
sort | “asc” | Sort'n th' output 'n asc end'n or desc end'n order |
style | "" | Choose between orange , grey , blue an' green fer nice style |
pattern | “.*” | A regular expressions, used t' filter th' attachments by file name. Th' pattern parameter value must be regular expressions. |
For example:
- T' match a file suffix o' ‘jpg’, use *.jpg (not *.jpg).
- T' match file names end'n 'n ‘jpg’ or ‘png’, use .*(jpg|png)
Examples
List o' attachments end'n 'n pdf or mp4
{{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}}
renders as
Colored styled box
{{%attachments style="orange" /%}}
renders as
{{%attachments style="grey" /%}}
renders as
{{%attachments style="blue" /%}}
renders as
{{%attachments style="green" /%}}
renders as