Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghaschel/grunt-markdown-it-ext
https://github.com/ghaschel/grunt-markdown-it-ext
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ghaschel/grunt-markdown-it-ext
- Owner: ghaschel
- License: mit
- Created: 2016-04-07T13:15:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T06:23:10.000Z (9 months ago)
- Last Synced: 2024-10-11T23:13:30.853Z (2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# grunt-markdown-it-ext
[![npm version](https://badge.fury.io/js/grunt-markdown-it-ext.svg)](https://badge.fury.io/js/grunt-markdown-it-ext)
> Grunt Markdown-it Extended - markdown-it (markdown parser) grunt plugin
## Getting Started
This is a fork from the [original package](https://github.com/ThePacielloGroup/grunt-markdown-it).
This plugin requires Grunt `~0.4.5`
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-markdown-it-ext --save-dev
```Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-markdown-it-ext');
```## The "markdown-it" task
### Overview
In your project's Gruntfile, add a section named `markdown-it` to the data object passed into `grunt.initConfig()`.```js
grunt.initConfig({
markdown-it: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
```### Options
#### options.separator
Type: `String`
Default value: `', '`A string value that is used to do something with whatever.
#### options.punctuation
Type: `String`
Default value: `'.'`A string value that is used to do something else with whatever else.
#### options.extensions
Type: `Object`
Default value: `null`An object requiring a markdown-it plugin. eg. `require('markdown-it-emoji')`
#### options.bootstrap
Type: `boolean`
Default value: `false`If set true, a `` tag pointing to MaxCDN's bootstrap files will be added.
#### options.docTitle
Type: `String`
Default value: `Readme.md`Title to be shown at the `readme.html` preview.
### Usage Examples
#### Default Options
In this example, the default options are used to generate a basic Markdown preview.```js
grunt.initConfig({
'markdown-it': {
options: {},
files: {
src:'README.md',
dest: 'readme.html'
}
},
});
```#### Custom Options
In this example, custom options are used to do generate a Markdown file with a custom title, bootstrap reset and unicode emoji support.```js
grunt.initConfig({
'markdown-it': {
options: {
bootstrap: true,
docTitle: 'This is a custom title',
extensions: [
require('markdown-it-emoji') //npm install markdown-it-emoji
]
},
files: {
src:'app/assets/README.md',
dest: 'public/assets/readme.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
* 0.2.4
* Added HTML Wrap
* Added Bootstrap support
* Added Custom title support
* 0.2.0 Initial fork