markdown-it-include
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "markdown-it-include", | ||
"version": "0.0.1", | ||
"description": "Markdown-it plugin which adds the ability to include markdown fragment files.", | ||
"keywords": [ | ||
"markdown-it-plugin", | ||
"markdown-it", | ||
"markdown", | ||
"inlcude" | ||
], | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "https://github.com/camelaissani/markdown-it-include" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/camelaissani/markdown-it-include/issues" | ||
}, | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"devDependencies": { | ||
"eslint": "0.10.2", | ||
"eslint-plugin-nodeca": "^1.0.0", | ||
"browserify": "*", | ||
"coveralls": "^2.11.2", | ||
"uglify-js": "*", | ||
"istanbul": "*", | ||
"chai": "*", | ||
"mocha": "*", | ||
"markdown-it-testgen": "~0.1.0", | ||
"markdown-it": "markdown-it/markdown-it" | ||
} | ||
} | ||
"name": "markdown-it-include", | ||
"version": "0.0.2", | ||
"description": "Markdown-it plugin which adds the ability to include markdown fragment files.", | ||
"keywords": [ | ||
"markdown-it-plugin", | ||
"markdown-it", | ||
"markdown", | ||
"inlcude" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/camelaissani/markdown-it-include" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/camelaissani/markdown-it-include/issues" | ||
}, | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"author": { | ||
"name" : "Camel Aissani", | ||
"email" : "camel.aissani@gmail.com", | ||
"url" : "https://nuageprive.fr/" | ||
}, | ||
"devDependencies": { | ||
"eslint": "0.10.2", | ||
"eslint-plugin-nodeca": "^1.0.0", | ||
"browserify": "*", | ||
"coveralls": "^2.11.2", | ||
"uglify-js": "*", | ||
"istanbul": "*", | ||
"chai": "*", | ||
"mocha": "*", | ||
"markdown-it-testgen": "~0.1.0", | ||
"markdown-it": "markdown-it/markdown-it" | ||
} | ||
} |
@@ -5,2 +5,4 @@ # markdown-it-include | ||
[![NPM](https://nodei.co/npm/markdown-it-include.png)](https://npmjs.org/package/markdown-it-include) | ||
Markdown-it plugin which adds the ability to include markdown fragment files. | ||
@@ -19,14 +21,46 @@ | ||
Let's create a markdown which uses a header and a footer from two separate files: | ||
**header.md** | ||
```markdown | ||
# This is my header for all my markdowns | ||
``` | ||
**footer.md** | ||
```markdown | ||
Follow me on twitter! | ||
``` | ||
Let's assume that header.md and footer.md are located in `/in/this/directory`. | ||
Now it's your turn to play markdown-it! | ||
```js | ||
var path = require('path'), | ||
md = require('markdown-it')() | ||
.use(require('markdown-it-include', path.join(__dirname, 'your_md_directory'))); | ||
var md = require('markdown-it')() | ||
.use(require('markdown-it-include'), '/in/this/directory'); | ||
md.render('!!!include(header.md)!!!\n\n*content*\n\n!!!include(footer.md)!!!'); | ||
md.render('!!!include(header.md)!!!\n\n*your content*\n\n!!!include(footer.md)!!!'); | ||
``` | ||
header.md and footer.md should be located in `your_md_directory`. | ||
It will produce this | ||
```html | ||
<h1>This is my header for all my markdowns</h1> | ||
<p><em>your content</em></p> | ||
<p>Follow me on twitter!</p> | ||
``` | ||
## Disclaimer | ||
This purposefully doesn't conform to any spec or discussion related to CommonMark. | ||
## License | ||
[MIT](https://github.com/camelaissani/markdown-it-include/blob/master/LICENSE) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
20602
0
65