Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skauffmann/test-sitemap
A simple script for validating sitemaps
https://github.com/skauffmann/test-sitemap
Last synced: 4 days ago
JSON representation
A simple script for validating sitemaps
- Host: GitHub
- URL: https://github.com/skauffmann/test-sitemap
- Owner: skauffmann
- License: mit
- Created: 2024-01-25T19:05:27.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-25T21:48:34.000Z (10 months ago)
- Last Synced: 2024-10-12T12:14:54.702Z (about 1 month ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sitemap Tester
Sitemap Tester is a Node.js application for validating sitemaps. It fetches the main sitemap of a given domain, parses it to find all page URLs, and then checks each page to ensure it is accessible.
## Features
- Fetches and parses sitemaps and nested sitemaps.
- Validates each URL in the sitemap.
- Reports inaccessible URLs and their HTTP status codes.## Prerequisites
- Node.js 18+
## Installation
First, clone the repository to your local machine and navigate to the directory,
Then, install the dependencies using Yarn (NPM or whatever):```bash
yarn install
```## Usage
To start the application, run:
```bash
yarn start
```Replace `` with the domain you want to test. For example:
```bash
yarn start example.com
```The application will fetch the sitemap from the specified domain, parse it, and test each URL in the sitemap.
## Output
The application will output:
- A dot (`.`) for each successfully tested URL.
- An 'x' for each URL that fails the test.
- A summary of inaccessible URLs along with their HTTP status codes.
- The total count of URLs tested, inaccessible URLs, and successfully accessed URLs.