shikensu-0.3.11: Run a sequence of functions on in-memory representations of files

Shikensu.Contrib

Description

Dictionary functions.

Synopsis

Documentation

Replace the current hash map with an empty one.

Clone.

For each definition that has the given localPath (1st argument), make a clone with a new localPath (2nd argument), and add that into dictionary just after the matching definition.

clone "index.html" "200.html" dictionary

Copy definition properties into the metadata.

See the toJSON implementation for Definition in Types to see what properties get put in here.

Exclude.

Filter out the definitions that have the given localPath.

Merge the current hash map with another one.

Append the basename to the dirname, and change the basename to the given string. It will NOT change definitions that already have the new basename.

permalink "index" dictionary

Prefix dirname.

Prefix the dirname of each definition with a given string.

Rename.

Change the localPath of the definitions that match a given localPath. For example, if you have a definition with the local path a/b/example.html:

rename "a/b/example.html" "example/index.html" dictionary

See localPath for more info.

Rename extension.

Example:

renameExt ".markdown" ".html" dictionary
-- The definitions that had the extname ".markdown"
-- now have the extname ".html"

Render content.

Replace the content property by providing a renderer. A renderer is a function with the signature Definition -> Maybe ByteString.

You can use this to render templates, markdown, etc.

Alias for renderContent.