Load documents from a directory (or single file) into Resource objects
If dir is a file path, returns a single-element array. If it is a
directory, reads all .md files within it. Exits the process with an
error message if the path does not exist or contains no Markdown files.
Parameters
dir: string
Absolute path to a directory of .md files or a single file
Load documents from a directory (or single file) into Resource objects
If
diris a file path, returns a single-element array. If it is a directory, reads all.mdfiles within it. Exits the process with an error message if the path does not exist or contains no Markdown files.