Socket
Book a DemoInstallSign in
Socket

captain-sitemap

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

captain-sitemap

Captain-sitemaps is an npm package, that acts as a high-level streaming sitemap generator. It simplifies JSON sitemap creation, making it easy for developers to organize and manage site navigation data.

1.0.8
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Captain Sitemap

Captain-sitemaps is an npm package, that acts as a high-level streaming sitemap generator. It simplifies JSON sitemap creation, making it easy for developers to organize and manage site navigation data.

Install the captain-sitemap npm package using the following command:

Installation

npm install captain-sitemap

How To Use

const crawlWebsite = require('captain-sitemap');

// Specify the website URL to crawl
const websiteUrl = 'https://example.com';

// Excluded File Extensions
const excludeFiles = ['ico', 'pdf'];

// Excluded Folder Extensions
const excludeFolders = ['/images/', '/downloads/'];

// Call the crawlWebsite function with the specified URL
crawlWebsite(websiteUrl)
  .then((urls) => {
    // Do something with the crawled URLs
    console.log('Crawled URLs:', urls);
  })
  .catch((error) => {
    console.error('Error:', error.message);
  });

Default Excluded File Extensions

let excludeDefaultArray = [
    'gif', 'jpg', 'jpeg', 'png', 'ico', 'bmp', 'ogg', 'webp', 'mp4', 'webm',
    'mp3', 'ttf', 'woff', 'woff2', 'eot', 'json', 'rss', 'atom', 'gz', 'zip',
    'rar', '7z', 'css', 'js', 'gzip', 'exe', 'svg', 'xml', 'pdf'
];

Add new Excluded File Extensions

const excludeFiles = ['ico', 'pdf',...];

Default Excluded Folder Extensions

let excludeSubdirectories = [
    '/_next/'
];

Add new Excluded Folder Extensions

const excludeFolders = ['/images/', '/downloads/',...];

Keywords

sitemap

FAQs

Package last updated on 17 Jul 2024

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.