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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mdxish

v0.1.3

Published

Custom MDX-like processor for interactive documents

Downloads

17

Readme

mdxish

NPM Version NPM License

Write high-quality, interactive blog posts in markdown, live.

See this readme rendered with mdxish instead

In a nutshell

  • write in markdown optionally including html / codeblocks
  • start a codeblock with // @run as the first line to render directly instead of as pre.
    • javascript / glsl become <script>, html renders, etc.
    • Attributes can be specified for scripts like // @run id="foo" type="bar".
  • optionally specify title and head block (e.g. custom styles or scripts outside of core post)
  • All headers are automatically given an id of their contents lowercase and hyphenated for easy linking - which can be done in markdown like [some text](#in-a-nutshell).

Checkout an example

Blog Post (directly from a gist):

https://mdxish.com/jasonjmcghee/cba64163600fa90a3ea5d2ea099f3b55

(or you can drop the username https://mdxish.com/cba64163600fa90a3ea5d2ea099f3b55)

Source (click "Raw" to see the raw markdown):

https://gist.github.com/jasonjmcghee/cba64163600fa90a3ea5d2ea099f3b55

This is purely for demonstrative purposes - check the examples folder for more recent examples of posts build with mdxish.

Installation

npm install -g mdxish

Or you can clone the repo and use npm run.

Getting started

There are two main ways mdxish can be used.

  1. Convert mdxish flavored markdown into static html locally (live or one-off) or in CI/CD.
  2. Put a mdxish flavored markdown file called index.md in a gist, copy the gist id, and go to https://mdxish.com/{gistId}

For example:

mdxish convert examples/falling-sand.md

To launch a live server that will automatically keep HTML up to date with whatever you write in your mdxish flavored markdown:

mdxish live examples/falling-sand.md

Note: this approach completely reloads all html / scripts on any change. You can customize this behavior to do whatever you want with the newly rendered HTML. Here's how to specify custom hot reload behavior.

Examples

Check the examples directory. The current best demonstration of capabilities is naive-gi.md. I strongly recommend using an IDE to view the markdown, as opposed to GitHub's preview.

Wrote a blog with mdxish and want to share it? Awesome! Open a PR and we'll add it to the examples!

Video Introduction (🔉 Sound on)

https://github.com/user-attachments/assets/cc416a37-5d33-4452-a5b2-7754e6932fad

Interactive Blog Tips!

Have suggestions / tips about building interactive blogs?

Add them here!