← All packages

@lacspace/sitemap

v1.2.1SEO Kit0 deps

Generate sitemap.xml, sitemap indexes and Next.js sitemaps — image/video/news extensions, hreflang alternates, auto-split at 50k URLs. Zero-dependency, isomorphic.

npm i @lacspace/sitemap

Usage

sitemap.ts
import { sitemap } from "@lacspace/sitemap";

const xml = sitemap([
  { loc: "https://lacspace.com/", changefreq: "daily", priority: 1.0, lastmod: new Date() },
  { loc: "https://lacspace.com/packages", changefreq: "weekly", priority: 0.8 },
  {
    loc: "https://lacspace.com/blog/launch",
    images: [{ loc: "https://lacspace.com/og/launch.png", title: "Launch" }],
    alternates: [{ hreflang: "ne", href: "https://lacspace.com/ne/blog/launch" }],
  },
]);

Exports 9

imageSitemapnewsSitemapsitemapsitemapForSitesitemapIndexsitemapStylesheetsplitSitemapstoNextSitemapvideoSitemap

Keywords

sitemapsitemap-xmlsitemap-generatorseonext-sitemaphreflang

More in SEO Kit