The Local Folder Source is used to pull content from a folder located on the same machine as Mosaic is running.

It is common to use this source when running mosaic locally.

yarn add @jpmorganchase/mosaic-source-local-folder

PropertyDescriptionRequired
modulePathThe path to the installed module (@jpmorganchase/mosaic-source-local-folder)Yes
namespaceThe scope for this sourceYes
disabledWhen true, content from this source is not usedNo
options.rootDirThe top level directory content will be pulled fromYes
options.prefixDirThe root path used in the content URLYes
options.extensionsCollection of file extensions that the source will look for inside the rootDirYes

This source will look for content with the ".mdx" extension in a "docs" directory 2 levels up from the Mosaic working directory. That content is included in the "local" namespace and available from a route that is prefixed with "local".

So if you had a file, docs/app/index.mdx then you would be able to view it at http://localhost:3000/local/app/index.

Mosaic BETA

Coming soon