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

@cocreate/sitemap

v1.6.4

Published

Automated stateless XML sitemap engine with multi-format media extraction (Images, Videos, Google News) and dynamic data-sharding for scalable document architectures.

Readme

CoCreate-sitemap

A high-performance, stateless, and functional JavaScript utility for automated XML sitemap generation and management. Engineered to run seamlessly across clustered environments, it dynamically builds, updates, and shards compliant sitemaps—including standard URLs, Images, Videos, and Google News metadata—by evaluating data modifications and parsing live HTML content.


Table of Contents


Features

  • Dynamic XML Automation: Intercepts real-time document modifications to generate, update, or expand sitemaps instantly.
  • Algorithmic Guardrails: Automatically enforces strict SEO quality filters, bypassing draft states, private URLs, noindex directions, and views missing a valid <title>.
  • Delta Freshness Verifications: Prevents redundant database write cycles by skipping processing if the active map's lastmod timestamp is already up to date with the resource's latest modification.
  • Hierarchical SEO Weighting: Automatically derives page crawling priority values based on the layout depth of the URL path, eliminating manual weighting.
  • Rich Media Graphing: Scans internal HTML nodes decorated with sitemap="true" to extract context and populate independent tracking sets for Images, Videos, and Google News.
  • Automated Index Sharding: Monitors file buffers natively to cleanly split indexing paths when passing Google's 50,000 URL limit or MongoDB's 15MB document safety limit.

Installation

npm install @cocreate/sitemap

[!NOTE] All core underlying dependencies (including parsing utilities like node-html-parser) are managed natively and installed automatically.


Usage

JavaScript API

Inject your runtime context (file, host, and your decoupled crud database engine) into the stateless check entry point:

import { check } from '@cocreate/sitemap';

const fileContext = {
  "content-type": "text/html",
  "public": true,
  "pathname": "/blog/dynamic-sitemaps",
  "src": "<html><head><title>My Blog Post</title></head><body>...</body></html>",
  "modified": { on: "2026-07-19T08:30:00Z" }
};

await check({
  file: fileContext,
  host: "https://example.com",
  crud: yourCrudDatabaseInstance
});

How it Works

  1. Eligibility Filter: The module checks structural requirements (such as content type, public access flags, absence of noindex directives, and valid <title> nodes).
  2. Freshness Assessment: The target's change vector is cross-referenced against saved records. If no updates are required, execution exits early to reduce unnecessary I/O.
  3. DOM Content Extraction: For valid HTML documents, the layout engine parses targeted media assets marked for sitemap ingestion.
  4. Sharding Verification: The engine reads the root index (sitemap.xml) to locate corresponding media buckets. If a sitemap approaches Google's 50,000 URL limit or MongoDB's 15MB document limit, a new sitemap shard is automatically created.
  5. XML Serialization: Encodes structural characters and writes updated sitemap data back through your configured crud transport.

HTML Schema Overrides

You can explicitly override calculated priorities, change frequencies, or extract media nodes directly from your frontend markup.

Meta Specifications

  • Exclude Page: <meta name="robots" content="noindex">
  • Custom Crawling Priority: <meta name="sitemap-priority" content="0.9">
  • Custom Change Frequency: <meta name="sitemap-changefreq" content="weekly">

Extended Media Node Extractors

Simply mark target elements with sitemap="true" to automatically include them in media sitemaps:

<!-- Automated Image Mapping -->
<img src="/assets/hero.jpg"
     sitemap="true"
     title="Hero View"
     alt="Main Dashboard Profile"
     sitemap-geo-location="New York, NY" />

<!-- Automated Video Mapping -->
<video src="/media/explainer.mp4"
       sitemap="true"
       title="Product Walkthrough"
       poster="/thumbs/explainer.jpg"
       description="A complete system overview"
       sitemap-duration="180" />

Announcements

All updates, protocol revisions, and performance improvements are documented in our CHANGELOG.md and on the CoCreate Sitemap GitHub Releases page.


Roadmap

If you are interested in the future direction of this project, please take a look at our open issues and pull requests on the repository. We welcome community input on scaling indexing strategies and improving sitemap generation performance.


How to Contribute

We encourage contribution to our libraries (you might even score some nifty swag), please see our CONTRIBUTING.md guide for details. If you encounter any bugs or wish to make feature requests, please submit an issue on our GitHub Issues tracker. We want this library to be community-driven, and CoCreate-led. We need your help to realize this goal.

For broader system configurations and API guides, please visit our CoCreate Sitemap Documentation.


About

@cocreate/sitemap is designed, built, and supported by the CoCreate Developer Experience Team.

[!NOTE] Please contact the Developer Experience Team via GitHub Discussions or join our Discord community for questions about sitemap generation, indexing, or deployment.

@cocreate/sitemap is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.


License

This software is dual-licensed under the GNU Affero General Public License version 3 (AGPLv3) and a commercial license.

  • Open Source Use: For open-source projects and non-commercial use, this software is available under the AGPLv3. For the full license text, see the LICENSE file.
  • Commercial Use: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our website.