@zubyjs/sitemap
TypeScript icon, indicating that this package has built-in type declarations

1.0.73 • Public • Published

@zubyjs/sitemap

The plugin for Zuby.js that automatically generates a sitemap.xml file for your website from your pages.

Installation

First, install the @zubyjs/sitemap package using your favorite package manager. If you aren't sure, you can use npm:

npm install @zubyjs/sitemap

Then add the @zubyjs/sitemap plugin to your zuby.config.mjs file under the plugins option:

  import { defineConfig } from 'zuby';
  import preact from '@zubyjs/preact';
+ import sitemap from '@zubyjs/sitemap';

  export default defineConfig({
    outDir: '.zuby',
    jsx: preact(),
+   plugins: [
+       sitemap()
+   ]
    ^^^^^^^^
  });

The plugin will automatically add link to the generated sitemap to the head of your HTML pages. And that's it! Now you can run zuby build and the sitemap.xml file will be generated.

NOTE: Always make sure that all zuby packages are in sync in your package.json file:

  {
    "name": "my-zuby-app",
    "version": "1.0.0",
    "dependencies": {
      "zuby": "latest",
      "@zubyjs/sitemap": "latest"
    }
  }

Contributing

This package is part of Zuby.js workspace and maintained by the team behind the Zuby package. Please refer to it for more details how to contribute.

License

MIT

Package Sidebar

Install

npm i @zubyjs/sitemap

Homepage

zubyjs.com

Weekly Downloads

1

Version

1.0.73

License

MIT

Unpacked Size

8.81 kB

Total Files

4

Last publish

Collaborators

  • futrou-bot
  • thehansys