{"id":22006382,"url":"https://github.com/tom-wolfe/gulp-markdownit","last_synced_at":"2025-03-23T06:44:01.558Z","repository":{"id":57258191,"uuid":"99353569","full_name":"tom-wolfe/gulp-markdownit","owner":"tom-wolfe","description":"A Gulp plug-in for the Markdown-It library.","archived":false,"fork":false,"pushed_at":"2018-08-07T10:06:03.000Z","size":47,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-07T20:37:04.073Z","etag":null,"topics":["gulp","gulpplugin","markdown","markdown-it","markdown-it-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tom-wolfe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-04T14:59:25.000Z","updated_at":"2019-04-29T17:47:36.000Z","dependencies_parsed_at":"2022-08-25T21:23:42.291Z","dependency_job_id":null,"html_url":"https://github.com/tom-wolfe/gulp-markdownit","commit_stats":null,"previous_names":["trwolfe13/gulp-markdownit"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-wolfe%2Fgulp-markdownit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-wolfe%2Fgulp-markdownit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-wolfe%2Fgulp-markdownit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-wolfe%2Fgulp-markdownit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-wolfe","download_url":"https://codeload.github.com/tom-wolfe/gulp-markdownit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066523,"owners_count":20555404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","gulpplugin","markdown","markdown-it","markdown-it-plugin"],"created_at":"2024-11-30T01:12:01.405Z","updated_at":"2025-03-23T06:44:01.527Z","avatar_url":"https://github.com/tom-wolfe.png","language":"JavaScript","readme":"# gulp-markdownit [![NPM version](https://img.shields.io/npm/v/gulp-markdownit.svg)](https://npmjs.org/package/gulp-markdownit)\n\n[![Build Status](https://travis-ci.org/trwolfe13/gulp-markdownit.svg?branch=master)](https://travis-ci.org/trwolfe13/gulp-markdownit) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nA plug-in for [gulp](https://github.com/gulpjs/gulp) that adds pipe support for the [markdown-it](https://github.com/markdown-it/markdown-it) library.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for use, or for development and testing purposes.\n\n### Installing\n\nThe package can be installed using the command below. It uses a peer dependency for the `markdown-it` library, so **it will use whatever version you have installed already.**\n\n```batchfile\nnpm install gulp-markdownit --save\n```\n\n### Usage\n\nHere are some instructions on how to use the task in your projects.\n\n#### Basic Usage\n\nThe basic usage couldn't be any simpler. Just pipe your markdown into the function and watch as HTML comes out the other end!\n\n```javascript\nconst markdown = require('gulp-markdownit')\n\ngulp.task('markdown', () =\u003e {\n  return gulp.src(\"*.md\")\n    .pipe(markdown())\n})\n```\n\n#### Configuring\n\nThe markdown-it library supports a lot of options, and often plugins offer up their own configuration options too. These can be supplied as a config object when configuring the pipe. Options that get passed to the markdown-it instance need to be declared as part of an `options` attribute on the config object, as per the example below.\n\nThis object is passed to the markdown-it instance (copied through `Object.assign`) so as new properties are added to the markdown-it library, this library should stay up to date, provided you update your markdown-it dependency. These options are also passed on to any plugins that you enable.\n\n```javascript\nconst markdown = require('gulp-markdownit')\n\ngulp.task('markdown', () =\u003e {\n  const config = {\n    options: {\n      html: true,\n      linkify: true,\n      typographer: true\n    }\n  }\n  return gulp.src(\"*.md\")\n    .pipe(markdown(config))\n})\n```\n\n#### Loading Plugins\n\nPlugins are one of the things that make the markdown-it library great, so it's only right that they should be as flexible as possible. When adding plugins, you can either provide a single plugin by itself, or pass multiple in an array.\n\nThe plugin itself can either be the plugin function object, the name of the module as a string which will be passed to `require`, or an object of the format: `{ plugin: object, options: object }`.\n\nThe reason for the last type is just in case two plugins provide options of the same name.\n\n```javascript\nconst markdown = require('gulp-markdownit')\nconst container = require('markdown-it-container')\n\ngulp.task('markdown', () =\u003e {\n  const config = {\n    plugins: container\n  }\n  return gulp.src(\"*.md\")\n    .pipe(markdown(config))\n})\n```\n\n### Configuration\n\nBelow is a list of all the available configuration options.\n\n#### disable\n\nType: `string|string[]`\n\nThis argument is passed to the [`MarkdownIt.disable`](https://markdown-it.github.io/markdown-it/#MarkdownIt.disable) method and allows you to disable the rules with the given names.\n\n#### enable\n\nType: `string|string[]`\n\nThis argument is passed to the [`MarkdownIt.enable`](https://markdown-it.github.io/markdown-it/#MarkdownIt.enable) method and allows you to enable the rules with the given names.\n\n#### options\n\nType: `object`\n\nThis object is passed into the markdown-it constructor on instantiation. Refer to the [markdown-it documentation](https://markdown-it.github.io/markdown-it/#MarkdownIt.new) for the full list of options.\n\n#### plugins\n\nType: `[function|string|{plugin: function, options: object}]`\n\n#### preset\n\nType: `string` default: `'default'`\n\nCurrently accepts `commonmark`, `default` and `zero`. See [MarkdownIt.new](https://markdown-it.github.io/markdown-it/#MarkdownIt.new) for more information.\n\n## Installing Dependencies\n\nInstalling the dependencies is done using a standard ```npm install```.\n\n## Running the Tests\n\nTests are written using Mocha. The following command will run the tests.\n\n```batchfile\nnpm test\n```\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/trwolfe13/gulp-markdownit/tags).\n\n## Authors\n\n* **Tom Wolfe** - *Initial work* - [trwolfe13](https://github.com/trwolfe13)\n\nSee also the list of [contributors](https://github.com/trwolfe13/gulp-markdownit/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-wolfe%2Fgulp-markdownit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-wolfe%2Fgulp-markdownit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-wolfe%2Fgulp-markdownit/lists"}