getTemplatesDirectory function Null safety

Future<Directory> getTemplatesDirectory(
  1. Config config
)

Templates folder contains Jinja templates for rendering Markdown files inside content folder.

Config: build.templates_dir

Implementation

Future<Directory> getTemplatesDirectory(Config config) async {
  return _getOrThrow(
    fs.directory(config.build.templatesDir),
  );
}