Nonstop Perpetual Motion

    This package has been deprecated

    Author message:

    No efforts are placed on updating grunt-html2md any longer


    3.0.0 • Public • Published


    Transform HTML files to Markdown in a Grunt task

    Build Status Maintainability dependencies Status Built with Grunt

    Getting Started

    This Grunt task plugin transforms the given HTML files to the Markdown format.

    This plugin requires Grunt ~1.0 and Node.js version to be minimum of 10.13.0, which is the active Long Term Support (LTS) version, and handles the transformation via HTML to Markdown converter ~3.1.

    If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

    npm install grunt-html2md --save-dev

    Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


    The "html2md" task


    In your project's Gruntfile, add a section named html2md to the data object passed into grunt.initConfig().

      html2md: {
        your_target: {
          // Target-specific source file lists and/or file write options go here.


    Options are passed to the to-markdown handler, please see for further details


    Type: boolean

    Default value: false

    GitHub Flavoured Markdown

    Usage Examples

    Default Options

    In this example, the default options are used, as there aren't any at the moment. All the files matching the src/*.html and legacy/*.html selectors will be used as HTML sources, which will be converted to Markdown files placed in the same folder as the given source file.

      html2md: {
        main: {
          src: [


    "A Beginner's Guide to Open Source: The Best Advice for Making your First Contribution".

    Also there is a blog post about "45 Github Issues Dos and Don’ts".

    Linting is done with ESLint and can be executed with npm run lint. There should be no errors appearing after any JavaScript file changes.


    Unit tests are done with Nodeunit.

    npm install
    npm run lint
    npm test

    Version history

    • v3.0.0 (2020-05-28)
      • Run tests also against Node.js version 14. Now versions 10, 12, and 14 of Node.js are covered at Travis CI
      • Minimum Node.js version lifted from 8.11.1 to 10.13.0
    • v2.0.0 (2019-01-22)
      • Minimum Node.js version lifted from 4.2.0 to 8.11.1
      • main property in package.json was pointing to a wrong file
    • v1.2.0 (2016-08-11)
      • Updating dependencies. Have you noticed it is now Grunt.js v1.0.0?
      • Use ESLint directly without the Grunt.js plugin
    • v1.1.0 (2016-02-15)
      • Updating dependencies
      • Minimum Node.js version supported is 4.2.0 (LTS)
    • v1.0.0 (2015-05-05)
      • Updating dependencies and better file configuration
    • v0.1.2 (2014-08-23)
      • Dependencies update and general code quality
    • v0.1.1 (2013-12-20)
      • Linting with eslint instead of JSHint for better coverage
    • v0.1.0 (2013-07-23)
      • Initial release


    Copyright (c) Juga Paazmaya

    Licensed under the MIT license.


    npm i grunt-html2md

    DownloadsWeekly Downloads






    Unpacked Size

    8.27 kB

    Total Files


    Last publish


    • paazmaya