Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sitemap-ts-advanced

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

sitemap-ts-advanced

Sitemap generator for TypeScript projects

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

sitemap-ts

NPM Version Monthly Downloads Types Licence CI

Sitemap generator.

This plugin scans your dist folder to generate sitemap.xml and robots.txt files.

Configuration options

hostname

  • Type: string
  • Default: 'http://localhost/'

Base URI.

pathPrefix

  • Type: string
  • Default: 'docs'

Specify a path prefix to be added to all paths.

dynamicRoutes

  • Type: string[]
  • Default: []

Array of strings with manual routes.

const names = [
  'John',
  'Bryce',
  'Addison',
  'Dana',
]
const dynamicRoutes = names.map(name => `/names/${name}`)
Sitemap({ dynamicRoutes })

exclude

  • Type: string[]
  • Default: []

Array of strings with excluded routes.

generateSitemap({
  exclude: ['/admin', '/private']
})

outDir

  • Type: string
  • Default: 'dist'

Output/Scan directory.

changefreq

  • Type: string | (route: string) => string
  • Default: 'daily'

Change frequency option for sitemap.

priority

  • Type: number | (route: string) => number
  • Default: 1

Priority option for sitemap.

lastmod

  • Type: Date | (route: string) => Date
  • Default: new Date()

Last modification option for sitemap.

readable

  • Type: boolean
  • Default: false

Converts XML into a human readable format

robots

  • Type: RobotOption[]
  • Default: [{ userAgent: '*', allow: '/' }]

RobotOption:

  • userAgent: string
  • allow?: string | string[]
  • disallow?: string | string[]
  • crawlDelay?: number
  • cleanParam?: string

License

MIT License © 2022 JB Aubrée

Keywords

FAQs

Package last updated on 01 Jun 2022

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc