1.5.5 • Published 5 months ago

@qalisa/vike-plugin-sitemap v1.5.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Vike Sitemap Plugin

A Vike plugin for handling sitemap.xml and/or robots.txt file generation automatically, based on your project structure.

Features

  • Automatically generates a sitemap.xml based on your pages/ directory.
  • Supports custom sitemap entries.
  • Generates a robots.txt file with configurable rules.
  • Updates in development mode when files change.
  • Fully configurable options.

Installation

npm install -D @qalisa/vike-plugin-sitemap

or

yarn add --dev @qalisa/vike-plugin-sitemap

or

pnpm install -D @qalisa/vike-plugin-sitemap

Usage

In your Vike project root, add the plugin to your Vite configuration file:

// vite.config.ts
import sitemap from '@qalisa/vike-plugin-sitemap';

export default {
  plugins: [sitemap({
    baseUrl: 'https://yourwebsite.com' // can be omited in dev
  })]
};

Configuration Options

OptionTypeDefaultDescription
pagesDirstring'pages'Directory containing your Vike pages.
baseUrlstring'http://localhost:3000'Base URL of your website.
filenamestring'sitemap.xml'Name of the sitemap file.
outputDirstring'.'Output directory for the sitemap and robots.txt, relative to your output bundle client files.
defaultChangefreqstring'weekly'Default change frequency for pages.
defaultPrioritynumber0.5Default priority for pages.
customEntriesSitemapEntry[][]Additional custom sitemap entries.
robotsRobotsOptions{ userAgent: '*', disallow: { cloudflare: true } }Robots.txt options.

License

MIT License

1.5.5

5 months ago

1.5.4

7 months ago

1.5.3

7 months ago

1.5.2

7 months ago

1.5.1

7 months ago

1.5.0

7 months ago

1.4.0

7 months ago

1.3.0

7 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.2

7 months ago