module:metalsmith-assignpermalinks

metalsmith-assignpermalinks

module.exports([options]) ⇒ function

Metalsmith plugin. Since metalsmith-permalinks uses the filedata.permalink as a boolean to determine whether or not to generate a permalink for the file. This is run after metalsmith-permalinks to set the value of filedata.permalink to the actual permalink url as a string.

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

Param Type Description
[ options ] Object
[ options.base ] String base URL (with trailing slash) to which path is appended

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

Metalsmith files iterator

Kind: inner method of module.exports

Param Type
files Object. < String.Object >
metalsmith Object
done function

assignPermalinks~assignPermalink(file)

Assign permalink to file object. Modifies file object.

Kind: inner method of assignPermalinks

Param Type Description
file String key in files