Current API is not stable.
A bridge between rust and NodeJS for mdbook.
mdbook-preprocessor(rust) --(stdin)--> mdbook-node-wrapper --(stdout)--> modified files
Features:
- custom fragment handler
- inject front matters into
- add tags page
First install bin
npm install -g https://github.com/miao1007/mdbook-node-wrapper.git
Add following your book.toml
cat >> book.toml << EOF
[preprocessor.node-wrapper]
EOF
Create a js for markdown fragment handling
// <book_root>/plugin/node-wrapper.js
module.exports = {
js: function(str){
// eg: make all js content uppercase
return str.toUpperCase();
}
}
- no cache now.
- bring node_modules back
- add tokenize(dict from tags)