diff --git a/src/index.js b/src/index.js index fd0e1eb..1b1ed59 100644 --- a/src/index.js +++ b/src/index.js @@ -110,7 +110,8 @@ function markdown(options = defaultOptions) { if (typeof value === 'string') { debug.info('Rendering key "%s" of file "%s"', key.join ? key.join('.') : key, file) set(data, key, options.render(globalRefsMarkdown + value, options.engineOptions, { path: file, key })) - } else { + // log a warning if the key is defined and of an unexpected type, but not if the property simply is not defined + } else if (typeof value !== 'undefined') { debug.warn('Couldn\'t render key %s of file "%s": not a string', key.join ? key.join('.') : key, file) } }) diff --git a/test/fixtures/default/src/index.md b/test/fixtures/default/src/index.md index b245991..2594cf5 100644 --- a/test/fixtures/default/src/index.md +++ b/test/fixtures/default/src/index.md @@ -1,4 +1,6 @@ - +--- +not_a_string: false +--- # A Markdown Post With some "amazing", _riveting_, **coooonnnntent**. \ No newline at end of file