Modules@robinpath/sitemap

@robinpath/sitemap

0.1.0Public

XML sitemap generation, parsing, validation, and manipulation with image/video/alternate support

@robinpath/sitemap

XML sitemap generation, parsing, validation, and manipulation with image/video/alternate support

Category Functions Auth License

Why use this module?

The sitemap module lets you:

  • Create XML sitemap
  • Create sitemap index
  • Parse XML sitemap
  • Parse sitemap index
  • Add URL to sitemap XML

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/sitemap

Quick Start

No credentials needed — start using it right away:

sitemap.createIndex [{"loc": "https://example.com/sitemap1.xml"}]

Available Functions

FunctionDescription
sitemap.createCreate XML sitemap
sitemap.createIndexCreate sitemap index
sitemap.parseParse XML sitemap
sitemap.parseIndexParse sitemap index
sitemap.addUrlAdd URL to sitemap XML
sitemap.removeUrlRemove URL from sitemap XML
sitemap.filterByChangefreqFilter URLs by change frequency
sitemap.filterByPriorityFilter URLs by priority range
sitemap.sortByPrioritySort URLs by priority
sitemap.sortByLastmodSort URLs by last modified
sitemap.countCount URLs in sitemap
sitemap.extractLocsExtract all loc URLs
sitemap.validateValidate sitemap XML

Examples

Create sitemap index

sitemap.createIndex [{"loc": "https://example.com/sitemap1.xml"}]

Parse XML sitemap

sitemap.parse $xml

Parse sitemap index

sitemap.parseIndex $xml

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/sitemap";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  sitemap.createIndex [{"loc": "https://example.com/sitemap1.xml"}]
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/sitemap
Version0.1.0
LicenseMIT
Unpacked Size5.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

web