Socket
Socket
Sign inDemoInstall

sitemap-to-html

Package Overview
Dependencies
46
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sitemap-to-html

CLI tool to generate HTML files for each link defined in sitemap.xml


Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Install size
351 MB
Created
Weekly downloads
 

Readme

Source

Sitemap to HTML

This project is a command line utility that generates HTML snapshots for each URL from sitemap.xml file.

Useful for pre-generating HTML files for website crawlers that do not run javascript.

Just in case you need a quick win and you don't want to rewrite whole stack to be server-side rendered :)

Usage

  • npm install sitemap-to-html --save-dev
  • sitemap-to-html --sitemap sitemap.xml --output build

provide a regular sitemap.xml file and output path.

The tool will:

  1. visit link found in sitemap.xml with puppeteer
  2. wait for page to fully load (no network requests for at least 500ms)
  3. create HTML snapshot of loaded page
  4. save it in folder provided in --output flag (it is build folder by default)
  5. goto 1, until all links visited

In case of nested links, for example website.com/home/page/hello, the output will be saved in build/home/page/hello.html

FAQs

Last updated on 02 Jan 2020

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc