Skip to content

Easily generate a sitemap for your project based on your routing file using `sitemap` as the library.

Notifications You must be signed in to change notification settings

ChristoSmuts/sitemap-from-routes

Repository files navigation

Sitemap from Routes

This project is a simple way to generate a sitemap for your project based on your routing file. It uses the sitemap library to generate the sitemap.

Notes

You can also setup your project to generate the sitemap each time you run your build, allowing your sitemap to always be up to date based on your project routes.

"build": "... node generate-sitemap.js"

Add additional routes to the routes object in the generate-sitemap.js script.

routes = [...routes, "example-route"];

Usage

First, install the dependency sitemap:

yarn add sitemap or npm install sitemap

Then add the file generate-sitemap.js to your project root folder and add the script to your package.json scripts property:

"sitemap": "node generate-sitemap.js"

Then run the script to generate your sitemap:

yarn sitemap or npm run sitemap

Dependencies

About

Easily generate a sitemap for your project based on your routing file using `sitemap` as the library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published