Simple mimosa module which render markdown files using marked nodejs module
WARNING I've stopped to maintain this modules, so I'm happy to move the ownership of this repository if somebody is interested in maintaining it, refer to this issue
This mimosa module allows you to use markdown documents, which will be compiled to html static files. For more information regarding Mimosa, see http://mimosa.io
This module has been implemented and slightly tested during its development with mimosa 2.0.0-rc9 on Linux.
markdown to your list of modules. That's all! Mimosa will install the module for you when you start up.
The module pick the markdown files in the compiled directory (
sourceDir property from
watch Mimosa configuration section) which have the specified extensions from the
extensions option configuration of this module and compile to static html files under the compiled directory (
compiledDir property from
watch Mimosa configuration section).
The default configuration added to your mimosa configuration file when them module is installed is:
The only configuraiton properties which pertain itself module is
extensions, which is an array with the file extensions that will be considered as markdown documents, so they will be compiled to static html files. Bear in mind that the extensons are just the letters of the extension, it means the dot musn't be typed.
The other one configuration paramter is
options which is an object which contains the configurations accepted by marked node module, but just providing a syntax sugar on two of them:
renderer: This option parameter can be one of the next types:
highlight: this options parameter can be one of the next types:
markedrequires; it can be a dependency module or just a script path which must relative to the project's root folder
Any syntax sugar provided doesn't modify anything at all over
marked options, which the are processed in mimosa and provided to
marked as it originally requires.
Here there are some examples for the better understanding of the provided tiny syntax sugar options paramters:
non-exiting-marked-renderer should export a constructor under
Renderer property (e.g.
module.exports.Renderer = function ....)
Rendererinstance referenced in the same configuration file
var Renderer = require'non-existing-marked-renderer';var myRenderer = ;markdown:options:renderer: myRenderer
markedfunction embedded in the same configuration file
require'pygmentize-bundled' lang: lang format: 'html' codecallbackerr resulttoString;;markdown:options:highlight: highlightener
This module doesn't perform any smart operations, just integrate into the mimosa web framework workflow the markdown documents compilation using using marked node module.
The MIT License, for more information read the LICENSE file