@zubyjs/sitemap
v1.0.74
Published
Zuby.js sitemap plugin
Downloads
14
Readme
@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