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-andy

v0.2.1

Published

A Gatsby theme to build Andy style websites.

Downloads

30

Readme

gatsby-theme-andy

This is inspired by the work of Andy and is based on gatsby-theme-brain. Also uses react-stacked-pages-hook for staking up the notes side by side. And unleashes the power of theme-ui for easy themeable components.

https://notes.aravindballa.com uses this with a few custom components and custom styles.

Getting started

This theme requires alteast NodeJS v12. You can check your version by running node -v in your terminal. Know more

From scratch

Video tutorial 👇

click to watch

Link to the video

  • Create a new directory and from that directory, run npm init.

  • Add all the dependencies yarn add gatsby react react-dom gatsby-theme-andy.

  • Create a file gatsby-config.js. Now we add gatsby-theme-andy to plugins and a title in siteMetadata in that config.

    module.exports = {
      siteMetadata: {
        title: 'My Notes',
      },
      plugins: [`gatsby-theme-andy`],
    };
  • Create directory content at root and add a few md files. We can use [[]] syntax to interlink the pages. Look at this directory for an example.

  • Now we add these scripts below to package.json and run yarn develop.

    "scripts": {
      "build": "gatsby build",
      "develop": "gatsby develop",
      "clean": "gatsby clean"
    },

Adding to an exsisting Gatsby project

Detailed steps coming soon

Configuration

All the plugin options valid for gatsby-theme-brain can be given to this theme as well. Other than those, we have

| Option | Default Value | Description | | ---------------------------- | ------------- | -------------------------------------------------------------- | | themeUIOtherwiseConfigured | false | Enable this if you have already setup theme-ui in your project |

Configuring the theme

This project uses theme-ui which allows us to easily theme the site. You can customize the theme by adding a file at .src/gatsby-theme-andy/theme.js. The default values for the theme are at src/theme.js. You can copy these to the new file you created and edit the values as you wish. 😎

Shadowing components

You can shadow/override a few components for increased customizability. In your project, you would need to place them at ./gatsby-theme-andy/src/components. ⚡️Have a look at the default components to see what props they get. Components you can override -

| Component | Description | | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | BrainNote.js | This is the note page and it is responsible for collecting all the popups and passing them to the MdxComponents.js. It's really a cool way of doing it. | | BrainNoteContainer.js | This is the layout page that stacks up the notes side by side. | | Popover.js | The component that pops up when you hover over an internal link. | | Header.js | The top bar of the website. If you just want to change the text, you can do it in gatsby-config.js -> siteMetadata -> title. | | Footer.js | Footer that contains the ReferredBlock as well as the message at the bottom of the note. | | RefererdBlock.js | The block which contains all the references (Referred in section) to the note. | | Tippy.js | This has the TippyJS configs. You can configure things like the hover animations here. Remember to change the css import as well. | | MdxComponents.js | This has a custom component AnchorTag which gets the popover as a prop and displays it when we hover over an internal link. If you wish to add extra MDX components, this is the place! |

Contribution

This project is relatively new. Please report issues you face and yes, I'd be happy to accept PRs. 😉