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

gatsby-theme-waves

v0.1.6

Published

Bring scrollytelling to your mdx.

Downloads

25

Readme

Gatsby Theme Waves

Still experimental but you can give it a try

Bring scrollytelling to your mdx. Animate code, images, charts, maps and more as you scroll.

The MDX looks like this:

import { CodeWave } from "gatsby-theme-waves"

<CodeWave>

```py
# some code
```

# Some markdown

```py
# more code
```

More markdown

> and more

```py
# and more
```

- ok
- that's enough

</CodeWave>

Installation

You need a Gatsby site with MDX. For example, this is how you add gatsby-theme-waves to a site that uses gatsby-theme-blog:

  1. Install the theme (and deepmerge for merging the theme styles)

    npm install --save gatsby-theme-waves deepmerge
  2. Add the theme to your gatsby-config.js (at the end of the plugin list just in case)

    module.exports = {
      plugins: [
        "gatsby-theme-blog",
        "gatsby-theme-waves", // <-- add this
      ],
    }
  3. Merge the styles: create or edit src/gatsby-plugin-theme-ui/index.js

    import wavesTheme from "gatsby-theme-waves/src/gatsby-plugin-theme-ui/index"
    import blogTheme from "gatsby-theme-blog/src/gatsby-plugin-theme-ui/index"
    import merge from "deepmerge"
    
    export default merge(blogTheme, wavesTheme)
  1. Import CodeWave and use it in any MDX file

    import { CodeWave } from "gatsby-theme-waves"
    
    <CodeWave>
    
    ```py
    # some code
    ```
    
    # Some markdown
    
    ```py
    # more code
    ```
    
    More markdown
    
    > and more
    
    ```py
    # and more
    ```
    
    - ok
    - that's enough
    
    </CodeWave>

Your set up should look like this example.

Code Blocks

By default the lines that changed between two consecutive code blocks will be highlighted. You can change it to highlihgt the line (and columns) you want:

```js 1:3,6
// highlihgts line 1,2,3 and 6
```

```js 5[1,3:6],8
// highlihgts:
// columns 1,3,4,5 and 6 from line 5
// and line 8
```

Coming Soon

  • Import code from files
  • Better custom code syntax highligthing using theme-ui
  • More waves
  • More docs