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

@haspcms/sitemap

v1.1.6

Published

A helper package for fetching sitemap pages and content entries from HASP CMS.

Readme

HASP Sitemap

Overview

HASP Sitemap is a lightweight sitemap generator designed for HASP CMS–powered projects.
It helps improve SEO by automatically generating XML sitemaps for pages and content entries.

Features

  • Automatic sitemap generation – no manual XML editing needed
  • 📄 Supports multiple page/content types
  • 🔗 Customizable URL patterns
  • 🔍 SEO-friendly output, fully compatible with search engines
  • 🛠️ Easy integration with Next.js

Installation

npm install @haspcms/sitemap

Configuration

  1. Create a sitemap.config.js file in the root of your project.
  2. Load environment variables and configure the generator:
require("dotenv").config(); // load .env at the very top

const { generateSitemap, setConfig } = require("@haspcms/sitemap");

const envVars = {
  HASP_TENANT_API: process.env.HASP_TENANT_API,
  HASP_RATE_LIMIT_KEY: process.env.HASP_RATE_LIMIT_KEY,
  HASP_MICROSITE_ID: process.env.HASP_MICROSITE_ID,
  NEXT_PUBLIC_SITE_URL: process.env.NEXT_PUBLIC_SITE_URL,
  HASP_CONTENT_TYPES: process.env.HASP_CONTENT_TYPES,
};

setConfig(envVars);

(async () => {
  try {
    await generateSitemap({
      outDir: "./public",
      siteUrl: envVars.NEXT_PUBLIC_SITE_URL,
      sitemapSize: 5000,
    });
    console.log("✅ Sitemap generated successfully!");
  } catch (err) {
    console.error("❌ Sitemap generation failed:", err);
  }
})();
  1. After creating the sitemap.config.js file, add a prebuild script that runs node sitemap.config.js in your package.json project file.

Output

The generator produces standard XML sitemap files inside ./public:

/public/sitemap.xml       # Sitemap index
/public/sitemap-0.xml     # First chunk
/public/sitemap-1.xml     # Additional chunks (if needed)

These files are ready to be served and discovered by search engines.

Example .env requirements

HASP_TENANT_API="http://your-tenant-domain-api.com"
HASP_MICROSITE_ID=1234
HASP_RATE_LIMIT_KEY="your-rate-limit-key"
HASP_CONTENT_TYPES="news,boilerplate-articles"

License

This project is licensed under the MIT License.

View Repository

https://github.com/haspcms/sitemap


💡 Tip: For best SEO results, make sure your sitemap URLs are accessible at
https://yourdomain.com/sitemap.xml.