Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djsutherland/grunt-mathjax-node-page
Grunt plugin to prerender MathJax
https://github.com/djsutherland/grunt-mathjax-node-page
grunt grunt-plugins mathjax
Last synced: 1 day ago
JSON representation
Grunt plugin to prerender MathJax
- Host: GitHub
- URL: https://github.com/djsutherland/grunt-mathjax-node-page
- Owner: djsutherland
- License: mit
- Created: 2017-07-18T23:00:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T12:06:26.000Z (over 7 years ago)
- Last Synced: 2024-11-14T01:02:16.321Z (5 days ago)
- Topics: grunt, grunt-plugins, mathjax
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# grunt-mathjax-node-page
> Grunt plugin to prerender MathJax in your HTML pages, with mathjax-node-page.
## Getting Started
This plugin requires Grunt `^1.0.0`If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell
npm install grunt-mathjax-node-page --save-dev
```Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-mathjax-node-page');
```## The "mathjax_node_page" task
### Overview
In your project's Gruntfile, add a section named `mathjax_node_page` to the data object passed into `grunt.initConfig()`.```js
grunt.initConfig({
mathjax_node_page: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
```### Options
#### options.page
Type: `Object`
Default value: `{}``pageConfig` for [mathjax-node-page](https://github.com/pkra/mathjax-node-page/#Usage).
For example, you might want `{singleDollars: true}`.#### options.mjnode
Type: `Object`
Default value: `{svg: true}`Configuration options for [mathjax-node](https://github.com/mathjax/MathJax-node).
For example, you might do `{linebreaks: true, width: 80}` to break long equations
at 80ex.### Usage Examples
Here is a simple example that renders `index.html` into `index-rendered.html`, allowing single dollar signs as inline math delimiters:
```js
grunt.initConfig({
mathjax_node_page: {
options: {
page: {
singleDollars: true
}
},
files: {
'index-rendered.html': ['index.html']
}
}
});
```## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).## Release History
* 2017-07-26 v0.1.3 Remove unused dependency.
* 2017-07-19 v0.1.2 Finish task properly.
* 2017-07-19 v0.1.1 Fix README.
* 2017-07-19 v0.1.0 Initial release.