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

docsify-codeview

v0.2.0

Published

A docsify plugin that embeds a Monaco code editor next to your documentation.

Readme

docsify-codeview

A docsify plugin that embeds a Monaco code editor next to your documentation — ideal for step-by-step coding tutorials.

When a page includes specially tagged code blocks, the plugin splits the page into two columns: your markdown lesson on the left, and an interactive editor on the right with buttons to switch between:

  • 🛠 Starting Point — an editable code template for the reader to work from
  • ✅ Potential Solution — a read-only solution
  • 𝌡 Diff View — an inline diff between the reader's current code and the solution
  • ⇐ 𝌡 — a diff against the previous chapter's solution

Pages without tagged code blocks render normally.

Setup

Add the plugin's stylesheet, the Monaco loader, and the plugin script to your docsify index.html:

<link rel="stylesheet" href="//unpkg.com/docsify-codeview/src/style.css">
...
<script src="//unpkg.com/docsify@4/lib/docsify.min.js"></script>
<script src="//unpkg.com/[email protected]/min/vs/loader.js"></script>
<script src="//unpkg.com/docsify-codeview/src/codeview.js"></script>

The Monaco loader must be included before codeview.js.

Usage

In a markdown page, embed code files using docsify's :include syntax with a template-<lang>, final-<lang>, or previous-<lang> tag:

[template](./assets/template.rs ':include :type=code template-rust')

[solution](./assets/solution.rs ':include :type=code final-rust')

[previous](./assets/previous.rs ':include :type=code previous-rust')
  • template-<lang> — the editable starting point shown to the reader
  • final-<lang> — the solution code
  • previous-<lang> — the previous chapter's solution, used for the "previous diff" button

<lang> is any language supported by Monaco (e.g. rust, javascript, python) and controls syntax highlighting.

All tags are optional — provide only the ones a page needs. At least one of template or final must be present for the editor to appear.

This plugin also works alongside docsify-tabs to keep the raw code blocks organized for readers without JavaScript; the tabs are removed once the editor loads.

Example

A complete example lives in example/. To run it:

npx serve .
# then open http://localhost:3000/example/

Development

npm install
npm test

License

MIT