This sample repository shows the different ways you can load data into pages, both from a dedicated folder (models/
in the example) or adjacent to the file being parsed.
Clone the repository. After that, install dependencies and run a build.
$ git clone https://github.com/tests-always-included/metalsmith-data-loader-example.git
$ cd metalsmith-data-loader-example
$ npm install
$ npm run build
After that, you can poke around in the src/
and dest/
folders to see what was used and how it turned out. The files in the dest/
folder are just JSON-encoded forms of all of the metadata of the file.
This repository is placed under a MIT license that contains an additional non-advertising clause.