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

@nathanfriend/website-3.0

v2.31.5

Published

The build artifacts from my static Jekyll site (nathanfriend.io)

Downloads

21

Readme

website-3.0

Another iteration of my personal website. This one is blog-focused and utilizes Jekyll for content management.

View the source on GitLab.

Building

To bundle and run this website locally, run bundle exec jekyll serve at the root of this project.

To include drafts, incremental compilation, and livereload, use bundle exec jekyll serve --incremental --drafts --livereload. (Livereload doesn't seem to work on Windows.)

Testing

Once a new version of this site is published to nathanfriend.io, automated tests can be run against the live site by running the tests in the website-3.0-tests project.

Note: Usually there is no need to trigger these manually; the deployment project automatically triggers a test run via a downstream pipeline after a successful deployment.

Publishing

In most cases, it is not necessary to publish or deploy manually. This is automated by the GitLab pipeline; simply bump the version in package.json and push new changes to master to trigger this project's pipeline. See the Deployment section below for more information.

If for some reason it is necessary to manually publish the finalized build artifacts to NPM, bump the version in package.json and run:

  • JEKYLL_ENV="production" bundle exec jekyll build
  • npm publish _site/

Make sure not to run npm publish from the root of the project, as this command will succeed, but will publish the wrong directory to NPM.

Rebuilding Algolia search index

Rebuilding of the Algolia search index is also automated by the GitLab pipeline and shouldn't need to be run manually.

To rebuild the Algolia search index manually, (used on the search page), run bundle exec jekyll algolia.

Note that this requires an Algolia API key to be provided either through a local _algolia_api_key file or through an ALGOLIA_API_KEY environment variable.

Deployment

In order for the GitLab pipeline to succeed, two environment variables must be present:

| Variable name | Description | | --------------- | --------------------------------------------------------------------------------------------------------------------------- | | ALGOLIA_API_KEY | Algolia API key used for updating the Algolia search index | | NPM_TOKEN | NPM token for publishing the @nathanfriend/website-3.0 package |

This project's pipeline is responsible for compiling the site into static HTML/CSS and publishing the result to npm (as @nathanfriend/website-3.0 package).

The final stage of this project's pipeline triggers a downstream pipeline in the website-3.0-docker project. This pipeline is responsible for actually deploying the site to nathanfriend.io`.

The site will only be published/deployed if the version in this project's package.json is bumped. Pushing commits to master without bumping the version in package.json will not cause the site to be redeployed.

License

The following directories and their contents are Copyright Nathan Friend. You may not reuse anything therein without my permission:

  • _posts/
  • _drafts/
  • assets/img/

All other directories and files are MIT Licensed. Feel free to use the HTML and SCSS as you please. If you do use them, a link back to https://gitlab.com/nfriend/website-3.0 would be appreciated, but is not required.