module:metalsmith-set-file-defaults

metalsmith-set-file-defaults

This module is specific to my site. It sets default metadata for each file.

module.exports([options]) ⇒ function

Metalsmith plugin

Kind: Exported function
Returns: function - metalsmith().use(callback) callback

Param Type
[ options ] Object

module.exports~DEFAULT_WIDGETS : Object

Default widgets for each file type

Kind: inner constant of module.exports

module.exports~filetypes : Object

Hash of settings for each filetype to set defaults for

Kind: inner constant of module.exports

module.exports~setJsdocDefaults(data) ⇒ Object

Add default metadata to jsdoc pages

Kind: inner method of module.exports
Returns: Object - extended data (modified data object)

Param Type Description
data Object metalsmith file data

module.exports~setPageDefaults(data) ⇒ Object

Add default metadata to pages

Kind: inner method of module.exports
Returns: Object - extended data (modified data object)

Param Type Description
data Object metalsmith file data

module.exports~setPostDefaults(data) ⇒ Object

Add default metadata to blog posts

Kind: inner method of module.exports
Returns: Object - extended data (modified data object)

Param Type Description
data Object metalsmith file data

module.exports~setFileDefaults(files, metalsmith, done)

Metalsmith files iterator

Kind: inner method of module.exports

Param Type Description
files Object keyed by filename from metalsmith
metalsmith Object
done function

setFileDefaults~setDefaults(file)

Modifies the metalsmith file object

Kind: inner method of setFileDefaults

Param Type Description
file String key in files