🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ngx-sitemaps

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-sitemaps

Generate sitemaps from Angular prerendered routes

0.1.0
latest
Source
npm
Version published
Weekly downloads
28
100%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-sitemaps

Generate sitemaps from Angular prerendered routes.

Prerequisites

  • Your project is an Angular project
  • Your project uses SSR with static site generation (SSG)

CLI usage

Before using the CLI, make sure to build your application. Afterward, run the following CLI command to generate the sitemap:

npx ngx-sitemaps https://your-site.com

To run the script always after the build, install the package in your project and set up a postbuild script in your package.json:

{
	"scripts": {
		"build": "ng build",
		"postbuild": "ngx-sitemaps https://your-site.com"
	}
}

Direct usage

If you already have a custom postbuild script, you can use the following code to generate the sitemap:

import { generateSitemap } from "ngx-sitemaps";

await generateSitemap("https://your-site.com");

Options

TitleCLI usageDirect usageDescription
Project--projectprojectProject name in angular.json

Keywords

angular

FAQs

Package last updated on 29 May 2025

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