Socket
Socket
Sign inDemoInstall

@axelrindle/vite-plugin-sitemap

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @axelrindle/vite-plugin-sitemap

Vite plugin for dynamic sitemap generation.


Version published
Maintainers
1
Install size
625 kB
Created

Changelog

Source

[0.1.0] - 2023-04-02

Initial release 🎉

Readme

Source

CI npm (scoped) commit style changelog style

vite-plugin-sitemap

🗺 Generate a sitemap

Generated sitemaps adhere to the protocol described on sitemaps.org.

Install

npm i @axelrindle/vite-plugin-sitemap

Usage

import sitemap from '@axelrindle/vite-plugin-sitemap'
import { defineConfig } from 'vite'

export default defineConfig({
    plugins: [
        sitemap()
    ]
})

Configuration

The sitemap function accepts an object with the following options:

pages

An array of Page objects describing the basic structure you want your sitemap to represent.

A Page has the following structure:

interface Page {
    // ------------------------------------
    // the relative path to the source file
    // this can be any type of file
    file: string

    // ------------------------------------
    // the relative url where the page
    // is accessible within your website
    route: string

    // ------------------------------------
    // a value between 0.0 and 1.0
    // defaults to 0.5
    priority?: number
}

output

The output directory to place the sitemap in.

Defaults to public.

baseUrl

A base url to prefix all pages with.

TODO

  • Automatic loading & processing of react-router route definitions

License

MIT

Keywords

FAQs

Last updated on 02 Apr 2023

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