Resources

Attachments

Th' resources shortcode displays th' titles o' resources contained 'n a plank bundle.

Attachments

Usage

While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shortcode from yer own partials.

{{% resources sort="asc" /%}}
{{ partial "shortcodes/resources.html" (dict
  "page" .
  "sort" "asc"
)}}

Multilanguage features be not supported directly by th' shortcode but rely on Hugo’s handl'n fer resource translat'ns applied when th' theme iterates over all avail'ble resources.

Parameter

Name Default Notes
style transparent Th' style scheme used fer th' box.

- by severity: info, note, tip, warning
- by brand color: primary, secondary, accent
- by color: blue, green, grey, orange, red
- by special color: default, transparent, code
color see notes Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.

- fer severity styles: a nice match'n color fer th' severity
- fer all other styles: th' correspond'n color
title see notes Arbitrary text fer th' box title. Depend'n on th' style there may be a default title. Any given value will overwrite th' default.

- fer severity styles: th' match'n title fer th' severity
- fer all other styles: Resources

If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
ay'con see notes Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default.

- fer severity styles: a nice match'n ay'con fer th' severity
- fer all other styles: paperclip

If ye want no ay'con, ye have t' set this parameter t' " " (a non empty d wit' spaces)
sort asc Sort'n th' output 'n ascend'n or descend'n order.
pattern .* A regular expressions, used t' filter th' resources by name. 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

Custom Title, List o' Resources End'n 'n png, jpg or gif

{{% resources title="Related **files**" pattern=".*\.(png|jpg|gif)" /%}}
Related files

Ahoi Styled Box, Descend'n Sort Order

{{% resources style="info" sort="desc" /%}}
Ahoi

Wit' User-Defined Color an' Font Awesome Brand Ay'con

{{% resources color="fuchsia" ay'con="fab fa-hackerrank" /%}}
Attachments

Style, Color, Title an' Ay'cons

For further examples fer style, color, title an' ay'con, see th' notice shortcode documentat'n. Th' parameter be work'n th' same way fer both shorrrtcodes, besides hav'n different defaults.