# grunt-mathjax-node-page

> Grunt plugin to prerender MathJax in your HTML pages, with mathjax-node-page.

Latest version **0.1.3** (published 2017-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-mathjax-node-page
pnpm add grunt-mathjax-node-page
yarn add grunt-mathjax-node-page
bun add grunt-mathjax-node-page
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2017-07-26 |
| First published | 2017-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dougal J. Sutherland |
| Maintainers | dougalsutherland |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-mathjax-node-page
- Repository: https://github.com/dougalsutherland/grunt-mathjax-node-page
- Issues: https://github.com/dougalsutherland/grunt-mathjax-node-page/issues
- npm.io page: https://npm.io/package/grunt-mathjax-node-page

## Dependencies (1)

- [mathjax-node-page](https://npm.io/package/mathjax-node-page.md) ^1.4.0

## Recent versions

- 0.1.3 (latest) — 2017-07-26
- 0.1.2 — 2017-07-18
- 0.1.1 — 2017-07-18
- 0.1.0 — 2017-07-18

## 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.

---
_Source: https://npm.io/package/grunt-mathjax-node-page · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
