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

@86d-app/sitemap

v0.0.40

Published

XML sitemap generation — auto-generate sitemaps from products, collections, pages, and blog posts

Downloads

268

Readme

@86d-app/sitemap

📚 Documentation: 86d.app/docs/modules/sitemap

XML sitemap generation module for 86d. Auto-generates sitemaps from products, collections, pages, blog posts, and brands with configurable priorities and change frequencies.

Features

  • Auto-generate XML sitemap from store data
  • Configurable per-source priorities and change frequencies
  • Custom entry support for pages not auto-discovered
  • Path exclusion rules
  • On-demand regeneration via admin
  • XML preview in admin
  • Homepage always included at priority 1.0
  • Proper XML escaping for special characters

Installation

Included by default when modules: "*" in your template config.json.

{
  "modules": ["sitemap"],
  "moduleOptions": {
    "@86d-app/sitemap": {
      "baseUrl": "https://mystore.com"
    }
  }
}

Configuration

The sitemap config is stored as a singleton record and can be managed via admin endpoints.

| Field | Type | Default | Description | |-------|------|---------|-------------| | baseUrl | string | https://example.com | Store base URL | | includeProducts | boolean | true | Include product pages | | includeCollections | boolean | true | Include collection pages | | includePages | boolean | true | Include static pages | | includeBlog | boolean | true | Include blog posts | | includeBrands | boolean | true | Include brand pages | | defaultChangeFreq | ChangeFreq | weekly | Default change frequency | | defaultPriority | number | 0.5 | Default priority (0.0-1.0) | | productChangeFreq | ChangeFreq | weekly | Product page frequency | | productPriority | number | 0.8 | Product page priority | | collectionChangeFreq | ChangeFreq | weekly | Collection page frequency | | collectionPriority | number | 0.7 | Collection page priority | | pageChangeFreq | ChangeFreq | monthly | Static page frequency | | pagePriority | number | 0.6 | Static page priority | | blogChangeFreq | ChangeFreq | weekly | Blog post frequency | | blogPriority | number | 0.6 | Blog post priority | | excludedPaths | string[] | [] | Paths to exclude from sitemap |

Change frequency values: always, hourly, daily, weekly, monthly, yearly, never

Store Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /sitemap.xml | Full XML sitemap (1hr cache) | | GET | /sitemap/stats | Public stats (entry count, last generated) |

Admin Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /admin/sitemap/config | Get current configuration | | POST | /admin/sitemap/config/update | Update configuration | | POST | /admin/sitemap/regenerate | Rebuild sitemap from store data | | GET | /admin/sitemap/entries | List entries (query: source, take, skip) | | POST | /admin/sitemap/entries/add | Add a custom entry | | POST | /admin/sitemap/entries/:id/remove | Remove a custom entry | | GET | /admin/sitemap/stats | Detailed stats with entries by source | | GET | /admin/sitemap/preview | Raw XML preview |

Regenerate

Send page data to rebuild the sitemap:

{
  "products": [{ "slug": "red-shoes", "updatedAt": "2024-01-01" }],
  "collections": [{ "slug": "summer" }],
  "pages": [{ "slug": "about" }],
  "blog": [{ "slug": "hello-world" }],
  "brands": [{ "slug": "nike" }]
}

Controller API

interface SitemapController {
  getConfig(): Promise<SitemapConfig>
  updateConfig(params): Promise<SitemapConfig>
  addEntry(params): Promise<SitemapEntry>
  removeEntry(id: string): Promise<boolean>
  listEntries(params?): Promise<SitemapEntry[]>
  countEntries(source?: string): Promise<number>
  generateXml(): Promise<string>
  regenerate(pages): Promise<number>
  getStats(): Promise<SitemapStats>
}

Types

type ChangeFreq = "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never"

interface SitemapEntry {
  id: string
  loc: string          // Full URL
  lastmod?: Date
  changefreq: ChangeFreq
  priority: number     // 0.0 - 1.0
  source: string       // product, collection, page, blog, brand, custom, static
  sourceId?: string
  createdAt: Date
}

interface SitemapStats {
  totalEntries: number
  entriesBySource: Record<string, number>
  lastGenerated?: Date
}

Notes

  • Regeneration clears auto-generated entries but preserves custom entries
  • Homepage is always included as a static entry with priority 1.0
  • Path exclusions match both exact paths and path prefixes
  • XML output is properly escaped for special characters
  • The /sitemap.xml endpoint returns application/xml with 1-hour cache headers
  • Appears under Content > Site in the admin sidebar