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

blog-vir

v0.1.0

Published

Generate a blog.

Readme

blog-vir

A simple blog builder that uses element-vir and Vite.

Install

npm i -D blog-vir url-vir

Usage

Configure blog-vir

Create src/blog-vir.config.ts:

import {type BlogVirConfig} from 'blog-vir';

const blogVirConfig: BlogVirConfig = {
    rssFeed: {
        title: 'My Blog',
        description: 'Notes from my blog.',
        siteUrl: 'https://example.com/blog',
    },
};

export default blogVirConfig;

Add posts

Add Markdown files under posts/:

---
title: My First Post
tags: [notes, example]
---

This appears on the post list.

<!--truncate-->

## More detail

This appears only on the full post page.

title is required. tags and date are optional. The post date is resolved from the front matter date, a date-prefixed filename such as 2026-08-14-my-first-post.md, the Git commit that added the file, or the filesystem creation time, in that order. The filename without its date prefix becomes the post slug.

The <!--truncate--> marker is optional. Without it, the complete post is shown on the post list.

Render the blog

Create src/my-blog.element.ts:

import {VirBlog} from 'blog-vir/src/ui/elements/vir-blog.element.js';
import {defineElement, html} from 'element-vir';

export const MyBlog = defineElement()({
    tagName: 'my-blog',
    render() {
        return html`
            <${VirBlog}>
                <span slot=${VirBlog.slotNames['vir-blog-brand']}>My Blog</span>
            </${VirBlog}>
        `;
    },
});

Then load it from src/index.html:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>My Blog</title>
        <script type="module" src="./my-blog.element.ts"></script>
        <link
            rel="alternate"
            type="application/rss+xml"
            title="My Blog RSS"
            href="/rss.xml"
        />
    </head>
    <body>
        <my-blog></my-blog>
    </body>
</html>

Run it

  • blog-vir dev src/blog-vir.config.ts: generates the blog data, watches posts for changes, and starts the Vite development server.
  • blog-vir build src/blog-vir.config.ts: generates the blog data and creates a Vite production build.
  • blog-vir preview src/blog-vir.config.ts: serves the existing Vite production build for local inspection.