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

remark-simple-sections

v2.0.0

Published

Simple remark plugin for wrapping level 2 headings in <section>.

Readme

remark-simple-sections

This is a simple remark plugin that wraps every <h2> and all following content (until next <h2> or parent ends) in <section>.

How does it work?

  • It goes through the whole Markdown document looking for <h2>. When the first encounter happens, it then wraps the found <h2> in <section> alongside with all following content until another <h2> is found, the document ends, or the parent element of this <h2> ends.

Why is this useful?

  • This plugin might help you in styling your Markdown content because it creates blocks of content that all might serve different purpose and therefore require unique styling.
  • Or maybe you just like it when the HTML has nicer structure.

Examples

Example 1

Lorem ipsum.

## Dolor sit amet
Hello sir

## Hello World
The world shines so brightly today.

## No content here

gets transformed into

<p>Lorem ipsum.</p>
<section>
  <h2>Dolor sit amet</h2>
  <p>Hello sir</p>
</section>
<section>
  <h2>Hello world</h2>
  <p>The world shines so brightly today.</p>
</section>
<section>
  <h2>No content here</h2>
</section>

Example 2

Bla gla.

## Bye, world.
Guuuuu

will be translated into

<p>Bla gla.</p>
<section>
  <h2>Bye, world.</h2>
  <p>Guuuuu</p>
</section>

Example 3

Diva

<div>
Hello sir

## Not again
nevermore

## vzum

</div>

Rum!

turns into

<p>Diva</p>
<div>
  <p>Hello sir</p>
  <section>
    <h2>Not again</h2>
    <p>nevermore</p>
  </section>
  <section>
    <h2>vzum</h2>
  </section>
</div>
<p>Rum!</p>

Suggestions

  • Plugin remark-normalize-headings might be useful in combination with this plugin as it might create more <h2> headings that could be wrapped.

Possible improvements

  • Add the option to select which level of heading should be wrapped (i.e. wrap e.g. <h4> headings instead of <h2>)
  • Or the option to wrap all headings within each other.

License

MIT © Adrián Zámečník