npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

grunt-strapdown

v1.0.0

Published

Compile markdown into html using strapdown.js.

Readme

grunt-strapdown

grunt task for strapdown.js

What Is This

This grunt task does a very stupid thing: it takes a set of markdown files and inserts each of them into a html template, where strapdown.js takes care of all the rest (the parsing and the styling).

For example, this markdown file xxx.md:

# I Am So Hungry
I am so hungry i can eat an elephant.

will be converted into a xxx.html:

<!DOCTYPE html>
<html>
<title>a</title>
<body>
<xmp theme="cyborg" style="display:none;">
# I Am So Hungry
I am so hungry i can eat an elephant.
</xmp>
<script src="http://strapdownjs.com/v/0.2/strapdown.js"></script>
</body>
</html>

(Something looks different about that </xmp> closing tag, see FAQ below.)

Drop this xxx.html into any static web server and open it from the browser, and strapdown.js will parse and style the markdown text for you.

Getting Started

Install this plugin:

npm install --save-dev grunt-markdown

Then enable it in your Gruntfile:

grunt.loadNpmTasks('grunt-strapdown');

Running Strapdown Task

Here's an example config in coffeescript:

grunt.initConfig
  strapdown:
    all:
      src: ['src/**/*.md']
      dest: 'htdocs'
      theme: 'cyborg'

You can run this task with grunt strapdown.

Options

Follow the example config above, these are the options that the strapdown task accepts:

  • src: required, pattern(s) to match markdown files.
  • dest: required, the directory where generated html files will be stored in.
  • theme: optional, defaults to 'cyborg'. See here for strapdown's bulitin themes and see bootswatch for more.

FAQ

  1. So what my markdown file didn't get parsed, it's just inserted right into the middle of a html template?

    Yes.

  2. And then when I open the html from the browser, that <script src="http://strapdownjs.com/v/0.2/strapdown.js"> tag is gonna get downloaded, and it's gonna do the parsing and styling for me?

    Yes.

  3. So i have to download a js file from somewhere else, that sounds weird and slow, why can't i just host that js file on my own server?

    You can, but it's a little bit more complicated, because strapdown.js is not just a js file. In order to parse and style the markdown text, this js file will dynamiclly load some other js/css files from strapdownjs.com. So you can't just host that single js file, you need to host all those other js/css files on your server, e.g. you need to clone this repo github.com/arturadib/strapdown.

    (And also in this version the template path is not yet configurable.)

  4. Oh, what about </xmp> tag in the example? That 'x' looks different.

    It's not the letter 'x', it's the multiplication sign '×'(wiki). Quote from strapdown.js:

    Limitations:

    It's an unlikely scenario, but since Strapdown uses the <xmp> tag to wrap your Markdown (so that users don't have to escape special HTML characters), your text can't contain the string </xmp>.

    That's why the 'x's are replaced by grunt-strapdown before the insertion into html.

  5. What's your favorite number?

License

MIT license, see LICENSE.