sitemap-merger
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

sitemap-merger

A simple CLI and npm package to merge sitemaps together.

This project is based on deprecated project merge-sitemaps

Usage

It will merge all child url comparing the text from tag loc from sitemap A to B resulting C.

With CLI

$ npx sitemap-merger sitemap.xml subdir/other-sitemap.xml build/sitemap.xml --format

(With the CLI, argument 1 is the base sitemap, argument 2 is the secondary sitemap, and argument 3 is the destination for the output.)

With API

const sitemapMerger = require("sitemap-merger");

console.log(
  sitemapMerger.merge(
    "base-xml-sitemap-as-string",
    "secondary-xml-sitemap-as-string",
    { prettyPrint: true }
  )
);

License

MIT. See the LICENSE file.

Readme

Keywords

Package Sidebar

Install

npm i sitemap-merger

Weekly Downloads

238

Version

1.0.3

License

MIT

Unpacked Size

6.25 kB

Total Files

7

Last publish

Collaborators

  • sirshurak