🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@answerable-kit/sitemap

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@answerable-kit/sitemap

Sitemap builder with smart path-based defaults for the Answerable SEO toolkit.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@answerable-kit/sitemap

Sitemap builder for the Answerable SEO toolkit. Takes a list of paths, applies smart defaults inferred from path patterns, and returns a Next.js-compatible MetadataRoute.Sitemap.

v0.1.0. buildSitemap() and sitemapIndex() ship today with smart path-based defaults for priority and change frequency.

Install

pnpm add @answerable-kit/sitemap
# requires next >= 14

Usage

// app/sitemap.ts
import { buildSitemap } from '@answerable-kit/sitemap';

export default function sitemap() {
  return buildSitemap(
    [
      { path: '/' },
      { path: '/about' },
      { path: '/privacy' },
      { path: '/blog/launch' },
      { path: '/blog/post-1', lastModified: '2026-05-14' },
    ],
    { baseUrl: 'https://acme.com' },
  );
}

Smart defaults

Priority and changeFrequency are inferred from path patterns when you don't set them explicitly:

Path patternprioritychangeFrequency
/ (home)1.0daily
/blog/*, /news/*, /posts/*0.7weekly
/docs/*0.6weekly
/products/*, /pricing0.8weekly
/about, /privacy, /terms, /contact, /faq0.3yearly
Anything else0.5monthly

Explicit priority or changeFrequency on a route always wins over inferred defaults.

Large sites (>50k URLs)

import { sitemapIndex } from '@answerable-kit/sitemap';

const index = sitemapIndex([
  { url: 'https://acme.com/sitemap-1.xml' },
  { url: 'https://acme.com/sitemap-2.xml', lastModified: new Date() },
]);

License

MIT © 2026 Anuj Ojha

FAQs

Package last updated on 17 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts