List
A base component that renders a list of items
Renders a list of images/icons with a title and description. The item may be wrapped with a link. The description/prose is written in marked markdown. All available list items are defined in a json file, which is located in the src/content/data/
directory, and injected into the metalsmith metadata with the @metalsmith/metadata
plugin. In this example we are using the awards.json
file. Then the list if filterred with the selections
array.
list:
source: awards
selections:
- title: "Award1"
- title: "Award2"
- title: "Award3"
- source - This is the key of the Metalsmith metadata object which holds all available list items.
- selections - This is an array of keys that are used to filter the list items.
For an usage example see the badges.
Award1
Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Award2
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.
Award3
Fusce dapibus, tellus ac cursus commodo, tortor mauris.